Skip to content

Instantly share code, notes, and snippets.

@rredpoppy
Last active March 1, 2016 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rredpoppy/841495b0dcd8d330f9ca to your computer and use it in GitHub Desktop.
Save rredpoppy/841495b0dcd8d330f9ca to your computer and use it in GitHub Desktop.
Shortner remover
// ==UserScript==
// @name 990Movie
// @namespace redpoppy
// @description Corrects 990 movies to bypass shortening
// @include http://990.ro/*
// @version 1
// @grant none
// ==/UserScript==
var links = document.querySelector('a[href*="mastervid.com"]');
if (typeof links[0] === 'undefined') {
links.href = links.href.substr(links.href.lastIndexOf('http://'));
}
else {
for (i = 0; i < links.length; i++) {
links[i].href = links[i].href.substr(links[i].href.lastIndexOf('http://'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment