Monkey Tab

Say monkey when opening a new tab

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Monkey Tab
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Say monkey when opening a new tab
// @match        *://*/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Check if the current tab is a new tab
    if (window.location.href === "about:blank") {
        // Create an audio element
        var audio = document.createElement("audio");
        // Set the source to a monkey sound
        audio.src = "https://freesound.org/data/previews/169/169731_3022696-lq.mp3";
        // Play the audio
        audio.play();
        // Display a message on the tab
        document.body.innerHTML = "<h1>Monkey!</h1>";
    }
})();