您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Remove URL Tracking/Redirects from Desidime.com
// ==UserScript== // @name Desidime Redirect Removal // @version 5 // @run-at document-start // @description Remove URL Tracking/Redirects from Desidime.com // @include https://www.desidime.com/* // @author kunalagra // @license MIT // @namespace https://greasyfork.org/users/878597 // @supportURL https://github.com/kunalagra/ // @run-at document-end // @icon https://play-lh.googleusercontent.com/Xzge4MB_HwymEGmd0iz_6ZOR6tPGaJYqNa1wVwggioBH_JvVoURc5_O-itr3jctyig // ==/UserScript== (function() { 'use strict'; function fixDesiDimeLinks() { document.querySelectorAll("a[data-href*='links?ref']").forEach(link => {; try { const dataHrefValue = link.getAttribute('data-href'); const targetURL = decodeURIComponent(new URL(dataHrefValue).searchParams.get('url')) || link.getAttribute('data-href-alt'); if (targetURL) { link.setAttribute('data-href', targetURL); link.href = targetURL; link.setAttribute('target', '_blank'); link.removeAttribute('data-href-alt'); } } catch (error) { console.error('Error processing data-href URL:', error); } }); // Handle standard 'href' attribute links document.querySelectorAll("a[href*='links?ref']").forEach(link => { try { const originalURL = new URL(link.href, window.location.origin).searchParams.get('url'); if (originalURL) { link.href = decodeURIComponent(originalURL); } } catch (error) { console.error('Error processing href URL:', error); } }); } // Debounced handler to avoid excessive calls to fixDesiDimeLinks let mutationTimeout; function handleDOMChanges(mutationsList) { if (mutationTimeout) clearTimeout(mutationTimeout); mutationTimeout = setTimeout(() => { fixDesiDimeLinks(); }, 100); } document.addEventListener('DOMContentLoaded', () => { const observer = new MutationObserver(handleDOMChanges); observer.observe(document.body, { attributes: true, childList: true, subtree: true }); }); })();