diff --git a/build.js b/build.js index a551832..75e0dde 100644 --- a/build.js +++ b/build.js @@ -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== diff --git a/src/userscript/index.js b/src/userscript/index.js index c6ab8ce..9c8f4a4 100644 --- a/src/userscript/index.js +++ b/src/userscript/index.js @@ -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) {