feat(userscript): support multiple users

main
Jad 2025-12-20 16:42:21 +08:00
parent 6cc0a2e412
commit 1a6dcf7dd3
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ const userscriptBanner = `// ==UserScript==
// @name Gemini NanoBanana Watermark Remover
// @name:zh-CN Gemini NanoBanana 图片水印移除
// @namespace https://github.com/journey-ad
// @version 0.1.1
// @version 0.1.2
// @description Automatically removes watermarks from Gemini AI generated images
// @description:zh-CN 自动移除 Gemini AI 生成图像中的水印
// @icon https://www.google.com/s2/favicons?domain=gemini.google.com
@ -13,6 +13,8 @@ const userscriptBanner = `// ==UserScript==
// @license MIT
// @match https://gemini.google.com/app
// @match https://gemini.google.com/app/*
// @match https://gemini.google.com/u/*/app
// @match https://gemini.google.com/u/*/app/*
// @grant GM_xmlhttpRequest
// @run-at document-start
// ==/UserScript==

View File

@ -40,7 +40,7 @@ const fetchBlob = (url) => new Promise((resolve, reject) => {
const replaceWithNormalSize = (src) => {
// use normal size image to fit watermark
return src.replace(/=s\d+.+$/, '=s0');
return src.replace(/=s\d+(?=[-?#]|$)/, '=s0');
}
async function processImage(imgElement) {