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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

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