Created
February 2, 2017 22:14
-
-
Save zekesonxx/109f0b7ac4ba081a5465eff9434c45a8 to your computer and use it in GitHub Desktop.
Automatically sets read receipts on any webmail you send. Can still be disabled manually.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Connexus WebMail Automatic Read Receipt | |
// @namespace http://tampermonkey.net/ | |
// @license GPL3 | |
// @version 0.1 | |
// @description Automatically sets read receipts on any webmail you send. Can still be disabled manually. | |
// @author Zach Mertes | |
// @match https://www.connexus.com/webmail* | |
// @include https://www.connexus.com/webmail* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var inCompose = false; | |
$(document).bind("DOMSubtreeModified", function(evt) { | |
var hasReceiptBox = $('#notification').length > 0; | |
if (hasReceiptBox && !inCompose) { | |
inCompose = true; | |
setTimeout(() => { | |
if ($('#notification')[0].checked === false) { | |
$('#notification')[0].click(); | |
} | |
},1000); | |
} else if (!hasReceiptBox && inCompose) { | |
inCompose = false; | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment