Skip to content

Instantly share code, notes, and snippets.

@lukepothier
Last active February 7, 2021 20:15
Show Gist options
  • Save lukepothier/2719b1f3d5c152366cf0d0034ba925d9 to your computer and use it in GitHub Desktop.
Save lukepothier/2719b1f3d5c152366cf0d0034ba925d9 to your computer and use it in GitHub Desktop.
Tampermonkey script which skips annoying tinyurl.is redirects
// ==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