Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ebiwd
rthelper
Commits
3d2eca1f
Commit
3d2eca1f
authored
Apr 20, 2021
by
Peter Walter
Browse files
modify spam button to forward original message to is-spam@labs.sophos.com, and delete ticket
parent
a56ae157
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
rthelper.user.js
rthelper.user.js
+24
-7
No files found.
rthelper.user.js
View file @
3d2eca1f
...
...
@@ -5,7 +5,7 @@
// @match https://helpdesk.ebi.ac.uk/*
// @include https://helpdesk.ebi.ac.uk/*
// @grant GM_xmlhttpRequest
// @version 2.
6.1
// @version 2.
7.0
// @updateURL https://gitlab.ebi.ac.uk/ebiwd/rthelper/raw/stable/rthelper.user.js
// @downloadURL https://gitlab.ebi.ac.uk/ebiwd/rthelper/raw/stable/rthelper.user.js
// @supportURL https://gitlab.ebi.ac.uk/ebiwd/rthelper/issues
...
...
@@ -424,6 +424,21 @@ function init() {
element
.
focus
();
})();
// click on element named in Click query string
(
function
doClick
()
{
var
clickElement
=
getParameterByName
(
'
Click
'
);
if
(
!
clickElement
)
{
return
;
}
var
element
=
document
.
querySelector
(
'
[name="
'
+
clickElement
+
'
"]
'
);
if
(
!
element
)
{
return
;
}
element
.
click
();
})();
// apply login and password to login box
(
function
autoLogin
()
{
if
(
!
document
.
querySelector
(
'
form#login
'
)
||
document
.
querySelector
(
'
ul.action-results li
'
)
||
document
.
referrer
.
indexOf
(
info
.
path
+
'
/NoAuth/Logout.html
'
)
!==
-
1
)
{
...
...
@@ -443,7 +458,7 @@ function init() {
}
}
else
{
document
.
querySelector
(
'
input[name="user"]
'
).
focus
();
document
.
querySelector
(
'
input[name="user"]
'
).
focus
();
}
})();
...
...
@@ -753,11 +768,13 @@ function init() {
}
insertLink
(
container
,
'
SPAM
'
,
buildLink
(
getModifyLink
({
'
Queue
'
:
'
spam
'
,
'
Status
'
:
'
deleted
'
}),
refreshElement
(
'
#body
'
)
)
'
Report Spam
'
,
"
javascript:(function(){
"
+
"
links=document.querySelectorAll('.actions .forward-link');fw=window.open(links[links.length-1].href+'&To=is-spam@labs.sophos.com&Content=Reporting+as+spam&Click=Forward','_blank');wait=setInterval(function(){if(fw.document.location.pathname=='/Ticket/Forward.html'&&fw.document.location.search==''){
"
+
"
clearInterval(wait);fw.close();
"
+
"
mod=document.querySelector('a#page-basics').href;jQuery.ajax({url:mod+'&Status=deleted',cache:false,complete:function(){location.reload();}})
"
+
"
}},1000);
"
+
"
})()
"
);
})();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment