您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
When clicking links in the description redirect directly to the url.
// ==UserScript== // @name Pixiv Direct External Link // @namespace http://tampermonkey.net/ // @version 0.1 // @description When clicking links in the description redirect directly to the url. // @author MatteCrystal // @match *://www.pixiv.net/* // @icon https://www.google.com/s2/favicons?domain=pixiv.net // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js // @run-at document-idle // @license MIT // ==/UserScript== (function() { 'use strict'; function redirectLink(){ console.log("Pixiv Direct External Link Script Started"); console.log("figcaption length: " + document.querySelector("figcaption").innerHTML.length); let linksLength = document.querySelectorAll('figcaption a[href^="/jump"]').length; console.log("Length: " + document.querySelectorAll('figcaption a[href^="/jump"]').length); for(let i = 0; i < linksLength; i++){ console.log("i:" + i); console.log("href = " + document.querySelectorAll('figcaption a[href^="/jump"]')[0].href); document.querySelectorAll('figcaption a[href^="/jump"]')[0].href = document.querySelectorAll('figcaption a[href^="/jump"]')[0].text; } } waitForElementToDisplay("figcaption",function(){ redirectLink(); },1000,9000); function waitForElementToDisplay(selector, callback, checkFrequencyInMs, timeoutInMs) { var startTimeInMs = Date.now(); (function loopSearch() { if (document.querySelector(selector) != null && document.querySelector(selector).innerHTML.length != undefined ) { console.log("html length: " + document.querySelector(selector).innerHTML.length); callback(); return; } else { setTimeout(function () { if (timeoutInMs && Date.now() - startTimeInMs > timeoutInMs) return; loopSearch(); }, checkFrequencyInMs); } })(); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址