我正在使用的网站在 Firefox 中随机停止工作。每次我尝试更新时,这段代码都会填充到 html 中,并且我试图理解它。我没有对网站中使用的 javascript 进行任何更改,但无论这是什么,都完全禁用了所有使用 javascript 的网站元素。更有趣的是,这种情况只发生在 Firefox 中。 Chrome 运行完美。我一整天都在研究 html,这是唯一奇怪的事情 - 我束手无策,有什么想法吗?我对 Javascript 不太了解,也没有接触过该网站脚本中的任何内容,所以我不明白为什么它们突然停止运行。
<script type="text/javascript" id="RTCEarlyScript">
window.oldSetTimeout = window.setTimeout;
window.setTimeout = function (func, delay) {
return window.oldSetTimeout(function () {
try {
if (!document.documentElement.getAttribute('stopTimers ')) {
if (typeof func == 'string') {
var nfunc = new Function(func);
nfunc();
} else func();
}
} catch (ex) {
}
}, delay);
};
window.oldSetInterval = window.setInterval;
window.setInterval = function (func, delay) {
return window.oldSetInterval(function () {
try {
if (!document.documentElement.getAttribute('stopTimer s')) {
if (typeof func == 'string') {
var nfunc = new Function(func);
nfunc();
} else func();
}
} catch (ex) {
}
}, delay);
};
</script>
最佳答案
RightToClick 扩展程序正在注入(inject)该脚本,并且显然不会在其自身之后进行清理。
禁用或删除它。
关于Firefox 中的 JavaScript 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26153751/