Workaround For Youtube Chat Memory Leaks (obsoleted)

Fix Youtube Live Chat Memory Leaks

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Workaround For Youtube Chat Memory Leaks (obsoleted)
// @namespace    https://twitter.com/laversheet
// @version      0.2
// @description  Fix Youtube Live Chat Memory Leaks
// @author       laversheet
// @match        https://www.youtube.com/live_chat*
// @match        https://www.youtube.com/live_chat_replay*
// @run-at       document-end
// @grant        none
// @license      BSD-3-Clause https://opensource.org/licenses/BSD-3-Clause
// ==/UserScript==

(function() {
    'use strict';

    /*
     * (2022-11-25)
     * YouTube seems to have fixed the problem already. So this script is no longer needed.
     *
     * (2021-02-23)
     * Currently, youtube live chat has a bug that never execute some scheduled tasks.
     * Those tasks are scheduled for each time a new message is added to the chat and hold the memory until being executed.
     * This script will let the scheduler to execute those tasks so the memory held by those tasks could be freed.
     */

})();