Last active
February 7, 2021 20:15
-
-
Save lukepothier/2719b1f3d5c152366cf0d0034ba925d9 to your computer and use it in GitHub Desktop.
Tampermonkey script which skips annoying tinyurl.is redirects
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 Skip tinyurl.is | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Skip tinyurl.is redirects | |
// @author Luke Pothier <[email protected]> | |
// @match https://tinyurl.is/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
docReady(function() { | |
document.getElementsByClassName('btn-secondary')[0].click(); | |
}); | |
})(); | |
function docReady(fn) { | |
if (document.readyState === "complete" || document.readyState === "interactive") { | |
setTimeout(fn, 1); | |
} else { | |
document.addEventListener("DOMContentLoaded", fn); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment