Created
November 21, 2024 15:01
-
-
Save axonxorz/96716ecd962f38fbb466925181fb2474 to your computer and use it in GitHub Desktop.
Tampermonkey script to detect rickrolls on reddit
This file contains hidden or 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 Rickrolly | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-11-21 | |
// @description You got it | |
// @author You | |
// @match https://*.reddit.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com | |
// @grant none | |
// ==/UserScript== | |
(async function () { | |
"use strict"; | |
const selectors = `a[href*='dQw4w9WgXcQ'] | |
a[href*='ub82Xb1C8os'] | |
a[href*='oHg5SJYRHA0'] | |
a[href*='0JgF4CMXU9M']` | |
.split("\n") | |
.filter((s) => s) | |
.map((s) => s + "::after") | |
.join(","); | |
const head = document.head || document.getElementsByTagName("head")[0]; | |
const style = document.createElement("style"); | |
style.id = "detect_rickroll"; | |
style.appendChild( | |
document.createTextNode( | |
selectors + | |
"{content:'ITS RICK ROLL!!!';font-size:0.6em;vertical-align:super;}" | |
) | |
); | |
head.appendChild(style); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment