AntiRickroll

Removes the page when you're trying to access a Rickroll page.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         AntiRickroll
// @namespace    https://github.com/charlie-moomoo
// @version      0.2
// @description  Removes the page when you're trying to access a Rickroll page.
// @author       CharlieMoomoo
// @match        *://blogs.mtdv.me/*
// @match        *://r.mtdv.me/*
// @match        *://*.youtube.com/*
// @icon         https://static.wikia.nocookie.net/youtube/images/c/ce/RickRollButWithADifferentLink.jpg/revision/latest?cb=20201023192005
// @grant        window.onurlchange
// @license      MIT
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    const run = ()=>{
        if (location.host.match(/.*\.youtube\.com/gm)){
            const rickrolls = ['dQw4w9WgXcQ','AACOcpA8i-U','j8PxqgliIno','bIwVIx5pp88','HnfkEVtetuE','QB7ACr7pUuE','mrThFRR3n8A','MCjlo7PtXMQ','a6pbjksYUHY','ll-mQPDCn-U','iik25wqIuFo','dRV6NaciZVk','LWErcuHm_C4','j7gKwxRe7MQ'];
            if (!rickrolls.includes(location.href.split('?v=')[1])) return;
        }
        document.write('Rickroll detected!<br><br>Rickroll removal powered by AntiRickroll');
        document.title = 'Rickroll detected';
        window.stop();
    }
    run()
    window.addEventListener("urlchange",run);
})();