Last active
January 14, 2018 15:58
-
-
Save WesleiRamos/282922cd2743519fc035557ed4b48d7d to your computer and use it in GitHub Desktop.
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 New Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include *://mail.google.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
function DetectImagem(element) { | |
for (var x in element) { | |
if (element[x] === undefined || element[x] === null) continue; | |
if (element[x].tagName == "IMG") return true; | |
} | |
return false; | |
} | |
var f = document.getElementsByName("t"); | |
for (var i in f) { | |
if (f[i] === undefined || f[i].parentNode == undefined) continue; | |
if (!DetectImagem(f[i].parentElement.childNodes)) { | |
f[i].checked = true; | |
} | |
} | |
var s = document.getElementsByName("nvp_a_tr")[0]; | |
if (!s) s = document.getElementsByName("nvp_a_dl")[0]; | |
s.click(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment