您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes broken Pixiv ugoira move.
// ==UserScript== // @name pixiv ugoira fix // @match https://www.pixiv.net/en/artworks/* // @description Makes broken Pixiv ugoira move. // @grant unsafeWindow // @license WTFPL // @version 0.0.1.20211116235617 // @namespace https://greasyfork.org/users/839834 // ==/UserScript== let oldFetch = fetch; async function persistentFetch(url) { let attemptsRemaining = 3; let response; while (attemptsRemaining--) { response = await oldFetch(url); if (response.ok) { return response; } } throw response; } let ugoiraRegex = /^https:\/\/i\.pximg\.net\/img-zip-ugoira\/img\//; unsafeWindow.fetch = function() { if (ugoiraRegex.test(arguments[0])) { return persistentFetch(arguments[0]); } return oldFetch.apply(this, arguments); }