Skip to content

Instantly share code, notes, and snippets.

@ypetya
Created December 4, 2014 09:26
Show Gist options
  • Save ypetya/a9dc236fbee271be3ff3 to your computer and use it in GitHub Desktop.
Save ypetya/a9dc236fbee271be3ff3 to your computer and use it in GitHub Desktop.
Tampermonkey user scripts
// ==UserScript==
// @name Gmail fapad
// @namespace http://*.google.com
// @version 0.1
// @description enter something useful
// @author [email protected]
// @match http*://mail.google.com/*
// ==/UserScript==
// @ REM grant unsafeWindow
// @ REM require http://code.jquery.com/jquery-latest.js
var startThis = function () {
var hideDomElementsWithClassName = function( selector ) {
var elements = window.document.getElementsByClassName(selector);
for(var i=0;i< elements.length;i++){
elements[i].remove();
console.log('removed ');
}
};
var hideThese = [ 'qp', 'D', 'E', 'pp', 'nM'];
for(var i=0;i<hideThese.length;i++) {
hideDomElementsWithClassName(hideThese[i]);
}
}
window.addEventListener ("DOMContentLoaded", function() {
console.log('=== running =========' );
setTimeout(startThis,5000);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment