返回首頁 

Greasy Fork is available in English.

Auto Refresh on Blocked Google

Refreshes the page if Google is blocked.

  1. // ==UserScript==// @name Auto Refresh on Blocked Google// @description Refreshes the page if Google is blocked.// @match *://www.google.com/*// @version 0.0.1.20250312182138// @namespace https://greasyfork.org/users/1435046// ==/UserScript==(function() {'use strict';function checkError() {if (document.querySelector("#main-frame-error .error-code")?.textContent.includes("ERR_BLOCKED_BY_RESPONSE")) {location.reload();}}// Run initially in case the error is already presentcheckError();// Observe changes to the document bodyconst observer = new MutationObserver(checkError);observer.observe(document.body, { childList: true, subtree: true });})();