简体   繁体   English

Chrome JS 控制台,如何在后台运行?

[英]Chrome JS console, how to run in the background?

Hi I'm trying to run a loop in Google Chrome JS console.您好我正在尝试在 Google Chrome JS 控制台中运行一个循环。 But the script seems to pause/freeze whenever I minimize or move to another window.但是,每当我最小化或移动到另一个 window 时,脚本似乎就会暂停/冻结。

How can I make it so it runs in the background until I manually stop it?我怎样才能让它在后台运行,直到我手动停止它?

This is a general problem with every loop script I try in Chrome.这是我在 Chrome 中尝试的每个循环脚本的普遍问题。

This is caused by unused tabs being frozen to save memory, resources and battery (a feature originally released in Chrome 46).这是由于未使用的标签被冻结以保存 memory、资源和电池( 最初在 Chrome 46 中发布的功能)。

You can disable it for any given tab or domain, by navigating to chrome://discards , then toggling Auto Discardable for your desired tab.您可以通过导航到chrome://discards discards 为任何给定的选项卡或域禁用它,然后为所需的选项卡切换Auto Discardable

There's also DoNotDiscard is a simple extension that prevents Chrome from suspending all tabs.还有DoNotDiscard是一个简单的扩展程序,可以防止 Chrome 暂停所有选项卡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM