// ==UserScript== // @name 縮減蝦皮網址 // @namespace https://greasyfork.org/zh-TW/scripts/457084 // @match *shopee.tw/* // @author czh // @icon https://www.google.com/s2/favicons?sz=64&domain=shopee.tw // @run-at document-start // @license GNU GPLv3 // @description 網址只留下識別碼 // @version 0.0.1.7 // @downloadURL https://update.greasyfork.icu/scripts/457084/%E7%B8%AE%E6%B8%9B%E8%9D%A6%E7%9A%AE%E7%B6%B2%E5%9D%80.user.js // @updateURL https://update.greasyfork.icu/scripts/457084/%E7%B8%AE%E6%B8%9B%E8%9D%A6%E7%9A%AE%E7%B6%B2%E5%9D%80.meta.js // ==/UserScript== var urlMatch = location.href.match(/.*\-i\.(\d+)\.(\d+)/); if (urlMatch && !location.href.includes("0-i.")) { var url = location.href.replace(/.*-i\.(\d+)\.(\d+)\?.*/, "0-i.$1.$2"); if (url !== location.href) { location.replace(url); } }