// ==UserScript== // @name Anilist more links (MAL/AniDB) // @namespace https://greasyfork.org/en/users/12725-alistair1231 // @version 0.1 // @description adds links to anilist/mal site to anilist (uses just the duckduckgo I'm feeling ducky feature with the anime name) // @author Alistair1231 // @match https://anilist.co/anime/* // @icon https://icons.duckduckgo.com/ip2/anilist.co.ico // @grant none // @require https://code.jquery.com/jquery-3.6.0.min.js // @license GPL-3.0 // @downloadURL none // ==/UserScript== (function () { "use strict"; let ready = setInterval(checkReady, 100); function checkReady() { if (jQuery(".content h1")[0]) { run(ready); } } })(); function run(ready) { clearInterval(ready); let linkBar = jQuery("div.external-links h2~div"); let name = jQuery(".content h1")[0].innerText; let mal = "https://duckduckgo.com/?q=!ducky+" + name + "+site%3Amyanimelist.net"; let anidb = "https://duckduckgo.com/?q=!ducky+" + name + "+site%3Aanidb.net"; linkBar.prepend(createButton(mal, "MAL")); linkBar.prepend(createButton(anidb, "AniDB")); // let kitsu = // "https://duckduckgo.com/?q=!ducky+" + name + "+site%3Akitsu.io"; // linkBar.prepend(createButton(kitsu, "kitsu")); } function createButton(link, name) { let a = document.createElement("a"); jQuery(a).attr("data-v-7a1f9df8", ""); a.href = link; a.target = "_blank"; jQuery(a).addClass("external-link"); a.innerHTML = name; // make purple jQuery(a).css("background", "rgb(150, 59, 241)"); return a; }