您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Basic pet pic replacer proof of concept. This one assuming you are replacing with images of another on site colour set of images.
// ==UserScript== // @name Pet Pic Replacer B // @namespace http://tampermonkey.net/ // @version 0.11 // @description Basic pet pic replacer proof of concept. This one assuming you are replacing with images of another on site colour set of images. // @author Twiggies // @match *://www.grundos.cafe/* // @exclude *://www.grundos.cafe/rainbowpool/neopetcolours/* // @icon https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe // @grant none // @license MIT // ==/UserScript== //Species colour image code. Extract from the end of an image url of theirs, after the last slash. //For example, 'https://grundoscafe.b-cdn.net/pets/circle/kau_rainbow_alt1.gif' you would get 'kau_rainbow_alt1.gif' const ogCode = 'kau_rainbow_alt1.gif'; //Image URLs of the one that it will be replacing with. //For example, 'https://grundoscafe.b-cdn.net/pets/circle/kau_royalgirl.gif' you would get 'kau_royalgirl.gif' const newCode = 'kau_royalgirl.gif'; //Url building arrays. const urlBase = 'https://grundoscafe.b-cdn.net/pets/' const urlBuild = ['circle/', 'happy/', 'sad/','angry/','beaten/','closeattack/','defended/','hit/','rangedattack/'] function replaceImage(og, newImg) { const imgList = document.querySelectorAll(`img[src="${og}"]`); if (imgList) { for (let i = 0; i < imgList.length; i++) { imgList[i].src = newImg } } } (function() { 'use strict'; for (let i = 0; i < urlBuild.length; i++) { replaceImage(urlBase+urlBuild[i]+ogCode, urlBase+urlBuild[i]+newCode); } })();