Skip to content

Instantly share code, notes, and snippets.

@BenjaminRH
Last active January 3, 2016 01:09
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/8387636 to your computer and use it in GitHub Desktop.
Save BenjaminRH/8387636 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @id 987654321
// @name KickAss Torrents Proxify
// @version 1.0
// @description Redirects you to a KickAss Torrents proxy
// @run-at document-start
// @match *.kickass.to/*
// @match *.kat.ph/*
// ==/UserScript==
var pattern = "^(http(s|):\/\/|)(www\.|)";
var kickass = new RegExp(pattern + "kickass\.to", "i");
var kat = new RegExp(pattern + "kat\.ph", "i");
var href = window.location.href.toLowerCase();
if (window.location.hostname.match(kickass) {
window.location.href = href.replace("kickass.to", "katproxy.com");
}
else if (window.location.hostname.match(kat)) {
window.location.href = href.replace("kat.ph", "katproxy.com");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment