您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
scroll to read picture in nhentai
当前为
// ==UserScript== // @name Nhentai scroll // @namespace https://github.com/Yan-Bin-Lin/nhentai_scroll_slide // @version 0.1( // @description scroll to read picture in nhentai // @author Lin Yan Bin // @match https://nhentai.net/g/*/*/ // @require https://code.jquery.com/jquery-3.5.1.min.js // @grant none // ==/UserScript== (function() { let ic = $("#image-container"); let num = parseInt($("span.num-pages").first().text()); let img = ic.find("img"); let src = img.attr("src"); let base = src.slice(0, src.lastIndexOf("/") + 1); let width = img.attr("width"); let height = img.attr("height"); let imgs = []; for (let i = 1;i <= num; i++){ imgs.push(base + i.toString() + '.jpg'); } function loadImage(imgs, width, height, target) { if (!imgs.length) { return; } let url = imgs.shift(); $('<img src="'+ url +'">').on("load", function() { $(this).width(width).height(height).appendTo(target); loadImage(imgs, width, height, target); }); } loadImage(imgs, width, height, '#image-container'); })();