Skip to content

Instantly share code, notes, and snippets.

@zekesonxx
Created February 2, 2017 22:14
Show Gist options
  • Save zekesonxx/109f0b7ac4ba081a5465eff9434c45a8 to your computer and use it in GitHub Desktop.
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.
// ==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