您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace specified links with images on 1337x.to
当前为
// ==UserScript== // @name Replace Links with Images on 1337x.to // @namespace http://tampermonkey.net/ // @version 0.1 // @description Replace specified links with images on 1337x.to // @author Your Name // @match *://1337x.to/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; // 获取所有的a标签 const links = document.querySelectorAll('a.js-modal-url'); links.forEach(link => { const href = link.href; // 检查链接是否匹配指定的格式 const match = href.match(/https:\/\/imgtraffic\.com\/i-1\/(\d{4}\/\d{2}\/\d{2}\/[a-z0-9]+)\.jpeg\.html/); if (match) { const imgSrc = `https://imgtraffic.com/1/${match[1]}.jpeg`; const imgElement = document.createElement('img'); imgElement.src = imgSrc; imgElement.dataset.original = imgSrc; imgElement.classList.add('img-responsive', 'descrimg', 'lazy'); imgElement.style.display = 'block'; link.parentNode.replaceChild(imgElement, link); } }); })();