您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Highlight original price tag for Foodpanda.
// ==UserScript== // @name Foodpanda original price tag // @namespace https://github.com/gslin/foodpanda-original-price-tag // @match https://www.foodpanda.com.tw/* // @grant none // @version 0.20210527.0 // @author Gea-Suan Lin <[email protected]> // @description Highlight original price tag for Foodpanda. // @license MIT // ==/UserScript== (() => { 'use strict'; let style = 'background: yellow;'; let ob = new window.MutationObserver(events => { events.forEach(ev => { ev.addedNodes.forEach(() => { document.querySelectorAll('li.vendor-characteristic > span').forEach(el => { if (el.innerText == '<店內價>') { el.closest('figcaption').setAttribute('style', style); } }); }); }); }); ob.observe(document, { childList: true, subtree: true, }); })();