Skip to content

Instantly share code, notes, and snippets.

@BenjaminRH
Last active September 8, 2020 09:53
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 BenjaminRH/8386255 to your computer and use it in GitHub Desktop.
Save BenjaminRH/8386255 to your computer and use it in GitHub Desktop.
var links = document.getElementsByTagName('a');
var replacements = 0;
for (var i = 0; i < links.length; i++) {
if (links[i].href.match(/^(http(s|):\/\/|)(www\.|)kickass\.to/i)) {
replacements += 1;
links[i].href = links[i].href.toLowerCase().replace('kickass.to', 'katproxy.com');
}
}
console.log('Replaced', replacements, 'KickAss links');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment