Last active
February 10, 2018 02:42
-
-
Save jaredrummler/539c4e9f1d1340b094e85f3df9fe4f53 to your computer and use it in GitHub Desktop.
Redirect to project pages on android-arsenal.com. Saves a click.
This file contains 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 android-arsenal-adblock-placeholder-remover.user.js | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Remove adBlock placeholders. Guilt++ | |
// @author Jared Rummler | |
// @match https://android-arsenal.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.querySelectorAll('div[id^=adsBlock]').forEach(function(e) { | |
e.parentNode.parentNode.removeChild(e.parentNode); | |
}); | |
})(); |
This file contains 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 android-arsenal-redirects.user.js | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Redirect to project pages. Saves a click. | |
// @author Jared Rummler | |
// @match https://android-arsenal.com/details/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
//document.querySelectorAll("a[href^='https://github.com']").forEach(function(e) { | |
document.querySelectorAll("a").forEach(function(e) { | |
var parent = e.parentElement; | |
if (parent !== null) { | |
var previousElement = parent.previousElementSibling; | |
if (previousElement !== null) { | |
if (previousElement.innerText === 'Link') { | |
console.log('Redirecting to ' + e.href); | |
window.location.replace(e.href); | |
} | |
} | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment