您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
7/12/2023, 11:51:54 AM
// ==UserScript== // @name Bricklink - Add Brickset instructions link // @namespace Violentmonkey Scripts // @match https://www.bricklink.com/v2/catalog/catalogitem.page // @grant none // @version 1.0 // @author legendeveryone // @description 7/12/2023, 11:51:54 AM // @run-at document-end // @license MIT // ==/UserScript== (function () { let urlElement = document.querySelector("div.innercontent table tbody tr td").lastChild.textContent.replace(": ",""); let link = "https://brickset.com/sets/" + urlElement; var node = document.getElementById("_idPriceGuideLink"); let copy = node.cloneNode(true); copy.firstChild.setAttribute("id", "bricksetLink"); copy.firstChild.setAttribute("href", link); copy.firstChild.setAttribute("rel", "noopener noreferrer"); copy.firstChild.setAttribute("target", "_blank"); copy.firstChild.innerText = "Instructions on BrickSet"; node.parentElement.appendChild(copy); })();