您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Reduce Browser's Energy Impact for playing YouTube Video
当前为
Inspired by kona's YouTube CPU Tamer
This is for all kinds of YouTube applications, including main page, embedded video, and live chat.
- Faster
- More Stable
- Lower Battery Consumption
Note1: This hijacks to setTimeout
, setInterval
, clearTimeout
, clearInterval
Note2: This uses setInterval(..., 250ms)
instead of requestAnimationFrame
for background running.
This userscript hijacks setTimeout & setInterval leading different browser behaviors as follows:
let f=function(){console.log('hello world')};
setTimeout(f,100);setTimeout(f,100);setTimeout(f,100);
Native: print out "hello world" 3 times.
Modified: print out "hellow world" 1 time.
let f=function(){console.log('hello world')};
setTimeout(f,100);setTimeout(f,110);setTimeout(f,120);
Native: print out "hello world" 3 times.
Modified: print out "hellow world" 1 ~ 3 time(s) depending on execution time of f and AnimationFrame's segregation;
let f=function(){console.log('hello world')};
setTimeout(f,100);setTimeout(f,200);setTimeout(f,300);
Native: print out "hello world" 3 times.
Modified: print out "hello world" 3 times.
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址