您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable AutoRefresh is a user script to override and disable meta refresh html tag on all websites to prevent the automatic refresh or redirection.
当前为
// ==UserScript== // @name Disable AutoRefresh // @name:fr Disable AutoRefresh // @namespace Disable AutoRefresh // @description Disable AutoRefresh is a user script to override and disable meta refresh html tag on all websites to prevent the automatic refresh or redirection. // @description:fr Disable AutoRefresh est un user script pour annuler et désactiver le tag html Meta refresh sur tous les sites web et empêcher le rafraîchissement automatique ou la redirection vers une autre page / site web. // @author SMed79 // @version 1.2 // @encoding utf-8 // @license https://creativecommons.org/licenses/by-nc-sa/4.0/ // @icon http://i.imgur.com/ZJ9mHLO.png // @twitterURL https://twitter.com/SMed79 // @contactURL http://tinyurl.com/contact-smed79 // @supportURL https://greasyfork.org/fr/scripts/16079-disable-autorefresh/feedback // @include http://* // @include https://* // @run-at document-start // @grant none // ==/UserScript== /* immediate redirection. <meta http-equiv="refresh" content="0; url=http://www.exemple.com/"> 5 second redirection. <meta http-equiv="refresh" content="5; url=http://www.exemple.com/"> */ (function () { window.addEventListener("DOMContentLoaded", function (event) { var allMetas, thisMeta, content, timeout, timeout_ms; allMetas = document.getElementsByTagName('meta'); console.log(allMetas) for (var i = 0; i < allMetas.length; i++) { thisMeta = allMetas[i]; if (thisMeta.httpEquiv.match(/refresh/i)) { if (thisMeta.content.match(/[\D]/)) { content = thisMeta.content.split(';'); timeout = content[0]; console.log(content); timeout_ms = (timeout > 1) ? (timeout - 1) * 1000 : 500; setTimeout("window.stop();", timeout_ms); } } } }); })();