您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Check if the commodity you want to buy is in stock of a particular Woolworths store.
// ==UserScript== // @name Woolworths check stock // @namespace http://tampermonkey.net/ // @version 2025-02-27 // @description Check if the commodity you want to buy is in stock of a particular Woolworths store. // @author dont-be-evil // @match https://www.woolworths.co.nz/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @license GPLv3 // ==/UserScript== (function() { 'use strict'; // Create a MutationObserver to detect changes in the document const observer = new MutationObserver(() => { if (!location.href.includes("/shop/productdetails")) { return; } const params = new URLSearchParams(location.search); let store = params.get("store"); if (store) { localStorage.setItem("store", store); } else { const new_url = new URL(location.href); const saved_store = localStorage.getItem("store"); if (saved_store) { store = saved_store; } else { store = 9057; // Ponsonby, Auckland } new_url.searchParams.set("store", store); location.href = new_url.toString(); } }); observer.observe(document.body, { childList: true, subtree: true }); })();