No more inactive tabs

Adds a hidden audio file from 13MB that plays silence to the pages you visit. This will not work on mobile

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         No more inactive tabs
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Adds a hidden audio file from 13MB that plays silence to the pages you visit. This will not work on mobile
// @author       Don
// @match        *://*/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Create the audio element
    var audioElement = document.createElement('audio');
    audioElement.src = 'https://raw.githubusercontent.com/KoboldAI/KoboldAI-Client/main/colab/silence.m4a';
    audioElement.controls = false;
    audioElement.autoplay = true; // Autoplay the audio

    // Listen for the "canplay" event before playing
    audioElement.addEventListener('canplay', function() {
        audioElement.play(); // Attempt to play the audio
    });

    // Append the audio element to the body of the page
    document.body.appendChild(audioElement);
})();