Skip to content

Instantly share code, notes, and snippets.

@aveao
Last active September 6, 2016 11:37
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 aveao/9caa68fc1155a953472a to your computer and use it in GitHub Desktop.
Save aveao/9caa68fc1155a953472a to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name CATS
// @namespace ardaozkal
// @author ardaozkal
// @description Cool Anti Troll Script
// @include *
// @version 1.1
// @grant none
// ==/UserScript==
var trollvids = ["kfVsfOSbJY0", "GVCzdpagXOQ", "dQw4w9WgXcQ", "screamer.swf", "1NvgLkuEtkA", "eAClgbD8Y1c", "b6RiXYJgYyM", "oHg5SJYRHA0", "rebecca.blackfriday", "0otMb53rtwY", "sg4mUAQb17Q"];
var redirto = "http://ardaozkal.github.io/kats.html"; //the link people will be redirected to if they open the above links
var page = window.location.href; //current page
trollvids.forEach(EXTERMINATE);
function EXTERMINATE(item, index)
{
if (page.indexOf(item) !== -1)
{ //checks if url include a trollvid
window.location.replace(redirto); //redirects to redirto link if it catches one
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment