您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
adds a button on AniList anime pages to search AnimeBytes for the title
当前为
// ==UserScript== // @name AniList - Search Title on AnimeBytes // @namespace http://greasyfork.icu/en/users/96096-purplepinapples // @match https://anilist.co/* // @grant none // @run-at document-end // @version 1.2 // @author purplepinapples // @description adds a button on AniList anime pages to search AnimeBytes for the title // ==/UserScript== (function () { function createSearchButton() { const navEl = document.querySelector(".content div.nav"); if (navEl) { const lastChild = navEl.children[navEl.children.length - 1]; const cloned = lastChild.cloneNode(true); cloned.innerText = "Search on AB"; cloned.href = "#"; cloned.addEventListener("click", function (e) { const seriesName = document.querySelector("h1").innerText; const targetUrl = "https://animebytes.tv/torrents.php?searchstr=" + encodeURIComponent(seriesName); e.preventDefault(); window.open(targetUrl, "_blank"); // new tab }); cloned.href = navEl.appendChild(cloned); } else { // check every 500ms if the page has loaded, so we can add the button setTimeout(() => createSearchButton(), 500); } } createSearchButton(); })();