-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEmailSender.user.js
49 lines (43 loc) · 1.19 KB
/
EmailSender.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// ==UserScript==
// @name EmailSender
// @namespace http://tampermonkey.net/
// @version 3.14
// @description EOS Stuff
// @author Connor Kaiser
// @grant GM_openInTab
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// @grant window.close
// @include https://mail.google.com/mail/*@@@
// ==/UserScript==
(function()
{
if (window.top === window.self)
{
var SendButtonCount = 0
var observer = new MutationObserver(function(mutations)
{
var Sendbutton = document.getElementsByClassName("T-I J-J5-Ji aoO v7 T-I-atl L3")
if (Sendbutton != null && Sendbutton.length != SendButtonCount)
{
SendButtonCount = Sendbutton.length;
}
else
{
return;
}
document.getElementsByClassName("T-I J-J5-Ji aoO v7 T-I-atl L3")[0].click()
setTimeout(function() {window.close();}, 5000);
});
observer.observe(document, {
childList: true,
subtree: true
});
return;
}
else
{
return;
}
return;
})();