您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirect the Redirected Url
当前为
- // ==UserScript==
- // @name URL Redirect Redirecter
- // @namespace FaustVXUrlRedirect
- // @version 0.1
- // @description Redirect the Redirected Url
- // @author FaustVX
- // @match https://www.curseforge.com/*
- // @match https://legacy.curseforge.com/*
- // @match https://*.youtube.com/*
- // @grant none
- // @supportURL https://gist.github.com/FaustVX/0deb00258929a517a6e2796f9020e17c#comments
- // @license MIT
- // ==/UserScript==
- const run = function() {
- 'use strict';
- const urlSplit = window.location.href.split('/');
- const domainName = urlSplit[2].split('.');
- if (domainName[1] === "curseforge") {
- document.querySelectorAll('a[href*="/linkout?remoteUrl="]').forEach(function (a) {
- a.href = decodeURIComponent(decodeURIComponent(a.href.split('/linkout?remoteUrl=')[1]));
- });
- } else if (domainName[1] === "youtube") {
- document.querySelectorAll('a[href*="/redirect"]').forEach(function (a) {
- a.href = decodeURIComponent(a.href.split('&q=')[1]);
- });
- }
- };
- function runWhenReady(callback) {
- const tryNow = function() {
- try {
- callback();
- } catch { }
- setTimeout(tryNow, 250);
- };
- tryNow();
- }
- runWhenReady(run);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址