Button audio figuccio

suono mp3 al click button

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

Advertisement:

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.

(I already have a user style manager, let me install it!)

Advertisement:

// ==UserScript==
// @name           Button audio figuccio
// @author         figuccio
// @namespace      https://greasyfork.org/users/237458
// @version        0.3
// @description    suono mp3 al click button
// @match          *://*/*
// @noframes
// @icon           https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @license        MIT
// ==/UserScript==
(function() {
    'use strict';
var audio = document.createElement("BUTTON");
audio.innerHTML = "Suono!";
document.body.appendChild(audio);
audio.style.position = "fixed";
audio.setAttribute('style',"position:fixed;top:100px;right:140px;background:red;color:lime;padding:3px 6px;border:1px solid yellow;border-radius:9px;cursor:pointer;");
//nitrito cavallo su faceboonon funziona
var Sound = new Audio("https://www.w3schools.com/jsref/horse.mp3");
audio.onclick = function () {
Sound.play();
};
})();