// ==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.6 // @downloadURL none // ==/UserScript== var utm = location.href.match(/\?.*\=.*/) if (utm == null) { return } else { utm = location.href.replace(/\?.*\=.*/, ""); location.replace (utm); } var url = location.href.match(/\/.*-i.\d+.\d+\?/) if (url == null) { return } else { url = location.href.replace(/.*-i.(\d+).(\d+)/, "product/$1/$2"); location.replace (url); }