Hide Tab Name and Icon 2

Made by K.Dot based off https://greasyfork.org/users/869339 (DotDotDash)

Versione datata 13/01/2023. Vedi la nuova versione l'ultima versione.

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

You will need to install an extension such as Tampermonkey to install this 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            Hide Tab Name and Icon 2
// @version         1.0
// @description     Made by K.Dot based off https://greasyfork.org/users/869339 (DotDotDash)
// @include         *
// @author          K.Dot
// @match           http://*/*
// @run-at          document-start
// @grant           none
// @license MIT
// @namespace https://greasyfork.org/en/users/1011635
// ==/UserScript==

function sleep(sec) {
    return new Promise(resolve => setTimeout(resolve, sec));
}

function change_name() {
    var titles = ["K.Dot", "KingKunta", "KungFuKenny"];
    var random = Math.floor(Math.random() * titles.length);
    document.title = titles[random];
}

function change_icon(url_image) {
    var link = document.querySelector("link[rel*='icon']");
    document.createElement('link');
    link.type = 'image/x-icon';
    link.rel = 'shortcut icon';
    link.href = url_image;
    document.getElementsByTagName('head')[0].appendChild(link);
    void 0;
}

async function main() {
    var icon = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Antonia_Sautter_Creations.png/120px-Antonia_Sautter_Creations.png"; // I could not find a blank image to save my life
    while (true) {
        await change_name();
        await change_icon(icon);
        await sleep(10000);
    }
}
main();