您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirects you to the FlawCra Monstercat API
// ==UserScript== // @name FlawCra Monstercat Redirect // @namespace https://flawcra.cc // @version 1.0.4-GitHub // @description Redirects you to the FlawCra Monstercat API // @author FlawCra // @license Apache License 2.0 // @match https://monstercat.com/* // @match https://www.monstercat.com/* // @grant unsafeWindow // ==/UserScript== (function() { 'use strict'; var interval = setInterval(() => { var regex = new RegExp("(.*)monstercat\.com\/release\/(.*)"); var playerRegex = new RegExp("(.*)monstercat\.com\/player\/release\/(.*)\?"); var altPlayerRegex = new RegExp("(.*)monstercat\.com\/player\/release\/(.*)"); if(regex.test(unsafeWindow.location.href)) { redirToMcatAPI(regex.exec(unsafeWindow.location.href)); } else if(playerRegex.test(unsafeWindow.location.href)) { redirToMcatAPI(playerRegex.exec(unsafeWindow.location.href)); } else if(altPlayerRegex.test(unsafeWindow.location.href)) { redirToMcatAPI(altPlayerRegex.exec(unsafeWindow.location.href)); } }, 1000); })(); function redirToMcatAPI(arr) { if(arr != null) { var code = arr[arr.length-1]; unsafeWindow.location.href = "https://mcat.flawcra.cc/release/"+code+"?ui"; } }