阅读:1559回复:3
请帮忙分析并修改一下脚本
// ==UserScript==
// @name onnotfocus unload everything // @namespace onnotfocus unload everything // @description Final level of my onnotfocus series, this script is ultimate version of all those and it is really dangerous, it not only unload plugin animation, image animation, it also break textarea but save much more CPU than two previous version. // @include * // @version 1 // @grant none // ==/UserScript== var STOREDHTML = document.body.outerHTML; document.addEventListener("visibilitychange", function() { if (document.visibilityState == "hidden") { document.body.outerHTML = ""; } else { document.body.outerHTML = STOREDHTML; } }); |
|
1楼#
发布于:2016-05-10 00:06
这个大意是最小化的时候,停止cpu占用,,我发现并不起作用,这是2014年的脚本,估计失效了,谁会修改一下呗
|
|
2楼#
发布于:2016-05-11 16:36
这个脚本并没有失效,但它的效果非常有限,副作用也很大。
它的效果体现在能节约浏览器处理页面显示内容时耗费的资源,主要是渲染动态图片、视频等等。对于页面脚本中各种运算耗费的资源是无能为力的。 |
|
3楼#
发布于:2016-05-13 16:35
谢谢楼上的恢复,我已经写了一个软件,就是当firefox 最小化的时候挂起firefox,这样firefox就不占用cpu了。只是由于我是暂时只学习了易语言,网上说易语言会报毒,为了怕网友引起误会,就不发不出来了,再说写的东西实在是太烂了。毕竟我仅仅自学了十天的易语言
|
|