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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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);
})();