Last active
February 24, 2016 17:06
-
-
Save Icelys/eef0ae1441226f0bbdd4 to your computer and use it in GitHub Desktop.
Stops rickrolls
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== | |
// @name Anti-Rickroll | |
// @namespace icelys.github.io | |
// @version 1 | |
// @grant none | |
// @match https://www.youtube.com/* | |
// ==/UserScript== | |
window.onload = function(){ | |
if(document.location.toString().match(/http(|s):\/\/www\.youtube\.com\/watch/)!=null){ | |
if(document.location.toString().match(/dQw4w9WgXcQ/ig) != null) { | |
//Video URL with video link in it | |
window.location = "http://icelys.github.io/files/Anti-Rickroll.html"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment