Skip to content

overcomplicated rickroll detector by meow-d

Screenshot of overcomplicated rickroll detector

Details

Authormeow-d

LicenseCC Zero

Categorygoogle.com, All Sites, *

Created

Updated

Size1.8 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

a configurable rickroll detector

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           overcomplicated rickroll detector
@namespace      idk
@version        1.0.1
@description    a configurable rickroll detector
@author         meow_d
@preprocessor   less
@var            text  links  links  "dQw4w9WgXcQ, oHg5SJYRHA0, xvFZjo5PgG0, LLFhKaqnWwk, Yb6dZ1IFlKc, p7YXXieghto, hWvM6de6mG8, j5a0jTc9S10, mx86-rTclzA, ub82Xb1C8os, '0-16Z3GwNk4', d0tGBCCE0lc, v7ScGV5128A, MCjlo7PtXMQ, HnfkEVtetuE, tmY-G6sngk8, TIcxXJHNqPc"
==/UserStyle== */

/* original: https://wetdry.world/@gravitos/112440596679924417 */

.make-rickroll-classes(@i: length(@links), @selectors: ~"") when (@i > 0) {
    @link: extract(@links, @i);
    .make-rickroll-classes(@i - 1, ~"a[href*='@{link}']::before, @{selectors}");
}

.make-rickroll-classes(0, @selectors) {
    @{selectors} {
        content: "rickroll➜";
        font-weight: bold;
        font-size: 0.8em;
        margin-right: .2em;
        color: red;

        /* doesn't actually work, but solved with inline-block */
        text-decoration: none !important;

        display: inline-block;
        text-wrap: nowrap;
    }
}

.make-rickroll-classes();

@-moz-document domain("google.com") {
    .make-rickroll-classes(@i: length(@links), @selectors: ~"") when (@i > 0) {
        @link: extract(@links, @i);
        .make-rickroll-classes(@i - 1, ~"a[href*='@{link}']::before, @{selectors}");
    }

    .make-rickroll-classes(0, @selectors) {
        @{selectors} {
            content: "🡇 rickroll 🡇";
            line-height: 0;

            display: block;
            height: 0;
            width: 0;
            text-wrap: nowrap;
            overflow: visible;

            position: relative;
            top: -.5em;
            left: 1.5em;
        }
    }

    .make-rickroll-classes();
}

Reviews

No reviews yet.