您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds links to specified series on the table view
当前为
// ==UserScript== // @name Sonarr & Radarr Link Adder // @namespace https://gf.qytechs.cn/en/users/814-bunta // @version 2.3 // @description Adds links to specified series on the table view // @author Bunta // @include http://billy:8989/* // @include http://localhost:8989/* // @include http://localhost:7878/* // @license http://creativecommons.org/licenses/by-nc-sa/3.0/us/ // @grant none // ==/UserScript== (function() { 'use strict'; // define what links to add to series/movie on the table list // these links will appear as icons to the right of the specified series' or movies' names // syntax: [Title, URL, icon] Note: Title must match the series/movie title in the list let tableLinks = [ //['86: Eighty Six', 'https://animekaizoku.com/86-eightysix-season-2-48569/', 'https://animekaizoku.com/favicon.ico'], //['Arifureta: From Commonplace to World\'s Strongest', 'https://animekaizoku.com/arifureta-from-commonplace-to-worlds-strongest-season-2-40507/', 'https://animekaizoku.com/favicon.ico'], //['Ascendance of a Bookworm', 'https://animekaizoku.com/ascendance-of-a-bookworm-part-3-42429/', 'https://animekaizoku.com/favicon.ico'], //['Attack on Titan', 'https://animekaizoku.com/attack-on-titan-the-final-season-part-2-48583/', 'https://animekaizoku.com/favicon.ico'], //['Black Clover', 'https://animekaizoku.com/black-clover-34572/', 'https://animekaizoku.com/favicon.ico'], ['Boruto: Naruto Next Generations', 'https://animekaizoku.com/boruto-naruto-next-generations-34566/', 'https://animekaizoku.com/favicon.ico'], //['Demon Slayer: Kimetsu no Yaiba', 'https://animekaizoku.com/demon-slayer-entertainment-district-arc-47778/', 'https://animekaizoku.com/favicon.ico'], //['Dr. Stone', 'https://animekaizoku.com/dr-stone-stone-wars-40852/', 'https://animekaizoku.com/favicon.ico'], //['Fire Force', 'https://animekaizoku.com/fire-force-season-2-40956/', 'https://animekaizoku.com/favicon.ico'], //['Jujutsu Kaisen', 'https://animekaizoku.com/jujutsu-kaisen-40748/', 'https://animekaizoku.com/favicon.ico'], ['Made in Abyss', 'https://animekaizoku.com/made-in-abyss-the-golden-city-of-the-scorching-sun-41084/', 'https://animekaizoku.com/favicon.ico'], //['Mushoku Tensei: Jobless Reincarnation', 'https://animekaizoku.com/jobless-reincarnation-part-2-45576/', 'https://animekaizoku.com/favicon.ico'], ['My Isekai Life', 'https://animekaizoku.com/?s=My+Isekai+Life', 'https://animekaizoku.com/favicon.ico'], ['One Piece', 'https://animekaizoku.com/one-piece-21/', 'https://animekaizoku.com/favicon.ico'], ['Overlord', 'https://animekaizoku.com/overlord-iv-48895/', 'https://animekaizoku.com/favicon.ico'], //['SPY x FAMILY', 'https://animekaizoku.com/spy-x-family-50265/', 'https://animekaizoku.com/favicon.ico'], //['That Time I Got Reincarnated as a Slime', 'https://animekaizoku.com/that-time-i-got-reincarnated-as-a-slime-season-2-part-2-41487/', 'https://animekaizoku.com/favicon.ico'], //['The Case Study of Vanitas', 'https://animekaizoku.com/the-case-study-of-vanitas-part-2-49114/', 'https://animekaizoku.com/favicon.ico'], //['The Promised Neverland', 'https://animekaizoku.com/the-promised-neverland-season-2-39617/', 'https://animekaizoku.com/favicon.ico'], //['The Rising of the Shield Hero', 'https://animekaizoku.com/the-rising-of-the-shield-hero-season-2-40356/', 'https://animekaizoku.com/favicon.ico'], //['Welcome to Demon School! Iruma-kun', 'https://nyaa.si/?f=0&c=1_2&q=iruma+dual', 'https://nyaa.si/static/favicon.png'], //['World Trigger', 'https://animekaizoku.com/world-trigger-season-3-44940/', 'https://animekaizoku.com/favicon.ico'], ]; // define what links to add to the "Links" menu for all series/movies // syntax: [Link Title, URL] // URL can use following substitutions: // {title} - Link Title let menuLinks = [ //['AniDB', 'https://anidb.net/perl-bin/animedb.pl?show=animelist&adb.search={title}&do.search=search'], ['MyAnimeList', 'https://myanimelist.net/anime.php?q={title}'], ['Kaizoku', 'https://animekaizoku.com/?s={title}'], ['PSArips', 'https://psa.pm/?s={title}'], ]; var tableArray = []; tableLinks.forEach(item => {tableArray.push(item[0])}); var menuArray = []; menuLinks.forEach(item => {menuArray.push(item[0])}); // Options for the observer (which mutations to observe: attributes, childList, subtree, characterData) const config = { attributes: true, childList: true, subtree: true }; // Callback function to execute when mutations are observed const callback = function(mutationsList, observer) { // Use traditional 'for loops' for IE 11 for(const mutation of mutationsList) { if (mutation.type === 'childList') { //console.log('A child node has been added or removed.'); //console.log(mutation) //console.log(mutation.target.classList) if (mutation.target.classList.length > 0) { // Adding links to titles on series table view if (tableLinks.length > 0 && (mutation.target.classList[0].startsWith('MovieIndex-contentBodyContainer') || mutation.target.classList[0].startsWith('SeriesIndex-contentBodyContainer') || mutation.target.classList[0].startsWith('VirtualTableRow') || mutation.target.classList[0].startsWith('ReactVirtualized__Grid__innerScrollContainer')) ) { $(mutation.target).find('a').filter(function() { return tableArray.includes($(this).text()) && $(this).parent().find('a').length < 2 }).each( function(index) { //console.log( $( this ).text() ); tableLinks.forEach(item => { if (item[0] == $(this).text()) $( '<a href="' + item[1] + '" target="_blank"><img src="' + item[2] + '" width=25 height=20 style="padding:0 5px 0 0;">' ).insertBefore(this); }); }); } // Adding links to "Links" shortcuts on series view if (menuLinks.length > 0 && (mutation.target.classList[0].contains('Tooltip/tooltipContainer/2693s') || mutation.target.classList[0].contains('Tooltip-tooltipContainer-QvZGu'))) { var linkClass = 'SeriesDetailsLinks-link-1ex7G Link-link-1HpiV Link-to-1Sec5' var spanClass = 'SeriesDetailsLinks-linkLabel-vUSqn Label-label-35sr8 Label-info-3wLFA Label-large-1fzy7' var links = $(mutation.target).find('div.SeriesDetailsLinks-links-34K7N'); if (links.length === 0) { linkClass = 'MovieDetailsLinks-link-b+Q3l Link-link-eqVai Link-to-HrHGW' spanClass = 'MovieDetailsLinks-linkLabel-lOlPy Label-label-7yLGs Label-info-k2BIG Label-large-DqvuI' links = $(mutation.target).find('div.MovieDetailsLinks-links-SY7ch'); } if (links.length === 0) continue; if (links.find('a').filter(function() { return menuArray.includes($(this).text()) }).length > 0) continue; var itemTitle = $('div.SeriesDetails-title-39xGO,div.MovieDetails-title-131Og span').text(); if (!itemTitle) continue; menuLinks.forEach(item => { links.append( '<a target="_blank" href="'+item[1].replace('{title}', itemTitle)+'" class="'+linkClass+'"><span class="'+spanClass+'">'+item[0]+'</span></a>'); }); } } } } }; // Create an observer instance linked to the callback function const observer = new MutationObserver(callback); // Start observing the target node for configured mutations observer.observe(document.body, config); // Later, you can stop observing //observer.disconnect(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址