AntiRickRoll

Never gonna rickroll you, never gonna let you get rickrolled.

目前为 2021-08-25 提交的版本。查看 最新版本

// ==UserScript==
// @name        AntiRickRoll
// @namespace   https://flawcra.cc/
// @match       https://*.youtube.com/*
// @match       https://antirickroll.flawcra.cc/*
// @grant       GM_getValue
// @grant       GM_setValue
// @grant       unsafeWindow
// @version     1.0.4-GitHub
// @author      FlawCra
// @description Never gonna rickroll you, never gonna let you get rickrolled.
// @run-at      document-start
// ==/UserScript==

(() => {
    let re = new RegExp('(.*)antirickroll.flawcra.cc/(.*)');
    if(re.test(location.href)) {
      unsafeWindow.GM_getValue = GM_getValue;
      unsafeWindow.GM_setValue = GM_setValue;
    }
  
    let blocked_ids = [
        "dQw4w9WgXcQ",
        "-51AfyMqnpI",
        "oHg5SJYRHA0",
        "cvh0nX08nRw",
        "V-_O7nl0Ii0"
    ];
    var h = new Headers();
    var ro = {
        method: 'GET',
        headers: h,
        Vary: 'Origin',
    };
    fetch("https://cors.flawcra.cc/?"+"https://antirickroll.flawcra.cc/list/", ro).then(r => r.json()).then(rickrolls => {
        for(var rr of rickrolls) {
          if(!blocked_ids.includes(rr))
            blocked_ids.push(rr);
        }
        if(blocked_ids.find(i => location.href.includes(i)) && !location.href.includes("https://antirickroll.flawcra.cc/?")) {
              console.log(GM_getValue("bypassed"))
              if(!GM_getValue("bypassed")) {
                  location = "https://antirickroll.flawcra.cc/?"+location.href;
              }
        GM_setValue("bypassed", false)
      }
    }).catch(er => console.log('error',er));
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址