Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
anfragen-pool-ux-improver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Seipel
anfragen-pool-ux-improver
Commits
b9101221
Commit
b9101221
authored
1 year ago
by
Jan Seipel
Browse files
Options
Downloads
Patches
Plain Diff
Eigentliches Userscript hinzugefügt
parent
cabeef48
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test-ap-ux-imporver.user.js
+72
-0
72 additions, 0 deletions
test-ap-ux-imporver.user.js
with
72 additions
and
0 deletions
test-ap-ux-imporver.user.js
0 → 100644
+
72
−
0
View file @
b9101221
// ==UserScript==
// @name test-ap-ux-improver
// @namespace https://test-anfragen-pool.swrapp.net/*
// @version 2024-04-17_14-04
// @require https://code.jquery.com/jquery-1.12.4.min.js#sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=
// @resource DASHBOARD_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-dashboard.css
// @resource TICKETZOOM_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketzoom.css
// @resource TICKETCLOSE_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketclose.css
// @resource TICKETCOMPOSE_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketcompose.css
// @resource TICKETEMAILOUTBOUND_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketemailoutbound.css
// @resource TICKETFREETEXT_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketfreetext.css
// @resource TICKETNOTE_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketnote.css
// @resource TICKETPHONE_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketphone.css
// @resource TICKETPHONEOUTBOUND_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketphoneoutbound.css
// @resource TICKETPHONEINBOUND_CSS https://gitlab.ard.de/Jan.Seipel/test-ap-ux-improver/-/raw/main/stylesheets/test-ap-style-ticketphoneinbound.css
// @description passt den IDA-Anfragen-Pool an die Anforderungen von IDA-Desk an
// @author Jan Seipel
// @match https://test-anfragen-pool.swrapp.net/*
// @grant GM_getResourceText
// @grant GM_addStyle
// ==/UserScript==
window
.
addEventListener
(
'
load
'
,
function
()
{
'
use strict
'
;
// ====== CUSTOM STYLESHEETS HINZUFÜGEN ======
// Checke, auf welcher Seite du dich befindest um
// jeweils ein anderes Stylesheet zu laden
const
URL
=
document
.
URL
// Alle verfügbaren Stylesheets & deren URL-Identifier
const
stylings
=
[
//{"id": "AgentDashboard", "stylesheet": "DASHBOARD_CSS"},
{
"
id
"
:
"
AgentTicketZoom
"
,
"
stylesheet
"
:
"
TICKETZOOM_CSS
"
},
{
"
id
"
:
"
AgentTicketClose
"
,
"
stylesheet
"
:
"
TICKETCLOSE_CSS
"
},
{
"
id
"
:
"
AgentTicketCompose
"
,
"
stylesheet
"
:
"
TICKETCOMPOSE_CSS
"
},
{
"
id
"
:
"
AgentTicketEmailOutbound
"
,
"
stylesheet
"
:
"
TICKETEMAILOUTBOUND_CSS
"
},
{
"
id
"
:
"
AgentTicketFreeText
"
,
"
stylesheet
"
:
"
TICKETFREETEXT_CSS
"
},
{
"
id
"
:
"
AgentTicketNote
"
,
"
stylesheet
"
:
"
TICKETNOTE_CSS
"
},
{
"
id
"
:
"
AgentTicketPhone
"
,
"
stylesheet
"
:
"
TICKETPHONE_CSS
"
},
{
"
id
"
:
"
AgentTicketPhoneOutbound
"
,
"
stylesheet
"
:
"
TICKETPHONEOUTBOUND_CSS
"
},
{
"
id
"
:
"
AgentTicketPhoneInbound
"
,
"
stylesheet
"
:
"
TICKETPHONEINBOUND_CSS
"
}
]
// Dashboard-Stylesheet auf allen Seiten laden,
// damit überall die Labels angezeigt werden
GM_addStyle
(
GM_getResourceText
(
"
DASHBOARD_CSS
"
))
// Zusätzliche Stylesheets je nach URL laden
for
(
let
style
of
stylings
)
{
URL
.
includes
(
style
.
id
)
&&
GM_addStyle
(
GM_getResourceText
(
style
.
stylesheet
))
}
// ====== WEITERE JAVASCRIPT FUNKTIONEN ======
// Erfassungsmaske Telefonticket immer
// im neuen Fenster öffnen
document
.
querySelector
(
"
#ToolBar li.PhoneTicket > a
"
).
setAttribute
(
"
target
"
,
"
_blank
"
)
// ====== AgentTicketClose ======
if
(
URL
.
includes
(
"
AgentTicketClose
"
))
{
// Subject und Content vorausfüllen
$
(
"
#Subject
"
).
val
(
"
Ticket geschlossen
"
);
$
(
"
iframe
"
)[
0
].
contentWindow
.
document
.
getElementsByTagName
(
"
body
"
)[
0
].
append
(
"
Ticket geschlossen
"
)
}
},
false
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment