你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/457205-unhold-youtube-resource-locks,源站連結 點此以跳轉

Unhold YouTube Resource Locks

释放 YouTube 用过的 IndexDBs 并禁用 WebLock 让后台页面能进入休眠



點此查看下載連結位址https://update.greasyfork.org.cn/scripts/457205/Unhold%20YouTube%20Resource%20Locks.user.js

安装此脚本?
作者
𝖢𝖸 𝖥𝗎𝗇𝗀
日安装量
0
总安装量
3,537
评分
5 0 0
版本
2024.03.27.0
创建于
2022-12-27
更新于
2024-03-27
大小
10.4 KB
兼容性
与 Firefox 兼容 与 Chrome 兼容 与 Opera 兼容 与 Edge 兼容
许可证
MIT
适用于

Script Description generated by ChatGPT

This userscript is specifically designed for YouTube to improve your browser's performance. It optimizes the way YouTube uses resources, especially when YouTube tabs are in the background.

The script primarily works with two technologies, IndexDB and WebLock. YouTube utilizes IndexDB, a low-level API for storing significant amounts of structured data, and keeps these databases open continuously. Our script strategically closes these databases when a YouTube tab is not active, thus freeing up resources. It also disables WebLock, an experimental technology designed to prevent simultaneous access to the same resources, eliminating any unnecessary resource locks.

While this script operates in the background, it logs actions to the console for visibility and begins running as soon as a YouTube page opens. Compatible with Chrome, Firefox, Edge, and Opera browsers, it can be installed using a userscript manager like Tampermonkey.

It's important to note that this script doesn't compromise YouTube's functionality. Instead, it aims to ensure that YouTube becomes less resource-intensive, especially when multiple tabs are open.

Description

This is a Userscript to fix the issues that YouTube native coding does not release the IndexedDBs after using, and disable the experimental WebLock which is useless for YouTube application.

This prevents Tab Discard feature introduced in Chrome, Edge, and Firefox.
After installing this, the background tabs can be able to sleep to save resources.

Note 1. Please wait 1 minute to see the unlocking!
Note 2. Not working for page with expanded live chat.

Before:



After:





Suggested Related Scripts

If you are looking for the way to watch YouTube with least CPU resources in your old machine, please use YouTube Minimal on PC and YouTube Minimal Fixs