您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Convert all Original Pixeldrain Links to pd for Bypassing in any Page even Linked Buttons.
当前为
// ==UserScript== // @name PixelDrain Bypass URLs Globally // @namespace SWScripts // @version v1.4 // @description Convert all Original Pixeldrain Links to pd for Bypassing in any Page even Linked Buttons. // @grant none // @license MIT // @run-at document-end // @match *://*/* // ==/UserScript== (function() { 'use strict'; const PIXELDRAIN_URL = /https?:\/\/(www\.)?pixeldrain\.com\/u\/(.*?)/g; const REPLACEMENT_URL = 'https://pd.cybar.xyz/'; function replaceTextInNode(node) { if (node.nodeType === Node.TEXT_NODE) { if (PIXELDRAIN_URL.test(node.textContent)) { node.textContent = node.textContent.replace(PIXELDRAIN_URL, (match, p1, p2) => { return REPLACEMENT_URL + p2; }); } } else if (node.nodeType === Node.ELEMENT_NODE) { node.childNodes.forEach(replaceTextInNode); if (node.tagName === 'A' && node.href && PIXELDRAIN_URL.test(node.href)) { node.href = node.href.replace(PIXELDRAIN_URL, (match, p1, p2) => REPLACEMENT_URL + p2); } } } function checkAndReplaceText() { replaceTextInNode(document.body); } function handleMutations(mutations) { mutations.forEach(mutation => { if (mutation.type === 'childList') { mutation.addedNodes.forEach(node => { replaceTextInNode(node); }); } }); } function observeDOMChanges() { const observer = new MutationObserver(handleMutations); observer.observe(document.body, { childList: true, subtree: true }); } function checkIfPixeldrainRedirect() { const currentUrl = window.location.href; if (PIXELDRAIN_URL.test(currentUrl) && /\/u\//.test(currentUrl)) { window.location.href = currentUrl.replace(PIXELDRAIN_URL, (match, p1, p2) => REPLACEMENT_URL + p2); } } document.addEventListener('DOMContentLoaded', function() { checkIfPixeldrainRedirect(); checkAndReplaceText(); observeDOMChanges(); }); setInterval(checkAndReplaceText, 1000); })();