您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a hovering MFC button to Amiami page, leading to myfigurecollection using JAN code
// ==UserScript== // @name Amiami - Hovering link to myfigurecollection // @namespace Violentmonkey Scripts // @match https://www.amiami.com/* // @grant none // @version 1.0 // @author kt0d // @license MIT // @description Adds a hovering MFC button to Amiami page, leading to myfigurecollection using JAN code // ==/UserScript== function makeMFCLink() { const janCodeLabelElement = [].slice.call(document.getElementsByClassName('item-about__data-title')).filter(a => a.textContent.match("JAN code")); let janCodeElement = janCodeLabelElement[0].nextSibling; let janCode = janCodeElement.innerText; let mfcLink = `https://myfigurecollection.net/?keywords=${janCode}&_tb=item`; return mfcLink; } var floatingButton = document.createElement('button'); floatingButton.innerText = 'MFC'; floatingButton.style.position = 'fixed'; floatingButton.style.bottom = '120px'; floatingButton.style.right = '50px'; floatingButton.style.backgroundColor = '#999999e6'; floatingButton.style.color = 'white'; floatingButton.style.border = 'none'; floatingButton.style.borderRadius = '50%'; floatingButton.style.height = '48px'; floatingButton.style.width = '48px'; floatingButton.style.boxShadow = '0 4px 12px #00000080' floatingButton.style.cursor = 'pointer'; floatingButton.style.zIndex = '1000'; floatingButton.style.fontSize = '1.125rem'; document.body.appendChild(floatingButton); floatingButton.addEventListener('click', function () { let mfcLink = makeMFCLink(); window.open(mfcLink, "_blank"); });