您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Refresh the page
当前为
// ==UserScript== // @name CDC Booking Page Reload every 15m // @namespace http://tampermonkey.net/ // @version 0.6 // @description Refresh the page // @author afjw // @match https://bookingportal.cdc.com.sg/* // @grant none // @license MIT // ==/UserScript== function isTargetPage() { return location.href === 'https://bookingportal.cdc.com.sg/NewPortal/Booking/BookingPL.aspx'; } // Only activate the reloader if we are on the correct page const observer = new MutationObserver((mutationsList, observer) => { // Your logic to respond to DOM changes if (isTargetPage()) { setInterval(() => { location.reload(); }, 5 * 60 * 1000); // 5 minutes in milliseconds } }); // Start observing the body (or any other node you care about) observer.observe(document.body, { childList: true, subtree: true }); if (isTargetPage()) { (function () { setInterval(() => { location.reload(); }, 5 * 60 * 1000); // 5 minutes in milliseconds })(); }