图集岛图片换源,图集页面显示小图
// ==UserScript== // @name 图集岛图片换源、图集页面显示小图修改匹配地址--lc自用 // @author 原作者请搜索:Ninkror // @namespace Ninkror // @version 1.1.2 // @description 图集岛图片换源,图集页面显示小图 // @match https://www.sqmuying.com/* // @include https://www.sqmuying.com/* // @match *.sqmuying.com/* // @include *.sqmuying.com/* // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @grant GM_registerMenuCommand // @require https://greasyfork.org/scripts/463455-nelementgetter/code/NElementGetter.js?version=1172110 // @license GPL // ==/UserScript== GM_addStyle(` #kbox { display: flex; flex-wrap: wrap; align-items: center; align-content: space-between; } #kbox > img { max-width: 15% !important; margin-bottom: 25px; } `); const srcList = [ 'pic.sqmuying.com', 'tjg.sqmuying.com', 'pic.gzhuibei.com', 'tjg.gzhuibei.com', 'picew6d4ew.82pic.com', 'tjgew6d4ew.82pic.com' ]; const nowSrc = GM_getValue('src'); new ElementGetter().each('img', document, (img) => { img.src = img.src.replace(/https:\/\/[^/]+/, 'https://' + nowSrc) }); srcList.forEach((item) => { GM_registerMenuCommand(`----${item == nowSrc ? '✅' : '❌'}${item}`, function () { GM_setValue('src', item); window.location.reload(); }); });