Last active
January 3, 2016 01:09
-
-
Save BenjaminRH/8387636 to your computer and use it in GitHub Desktop.
This file contains 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== | |
// @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