您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds big thumbnails to the search results on AniDB
- // ==UserScript==
- // @name AniDB Big Thumbnails on Search
- // @namespace https://github.com/Alistair1231/my-userscripts/
- // @version 0.1.4
- // @description Adds big thumbnails to the search results on AniDB
- // @author Alistair1231
- // @match https://anidb.net/anime/?*
- // @icon https://icons.duckduckgo.com/ip2/anidb.net.ico
- // @require https://code.jquery.com/jquery-3.6.0.min.js
- // @license MIT
- // ==/UserScript==
- function addStyleAttribute($element, styleAttribute) {
- $element.attr('style', $element.attr('style') + '; ' + styleAttribute);
- }
- var thumbnailContext = $($('.thumb.anime a picture'))
- var allThumbs = $("source,img", thumbnailContext)
- for (i = 0; i < allThumbs.length ;i++) {
- if (allThumbs[i].flag != 1) {
- var bigImg = allThumbs[i].srcset;
- allThumbs[i].flag = 1;
- allThumbs[++i].src = bigImg;
- allThumbs[i].width *= 3;
- allThumbs[i].height *= 3;
- allThumbs[i].loading = "eager";
- addStyleAttribute($(allThumbs[i]), 'max-width: 18.5em !important');
- }
- }