Greasy Fork is available in English.

Clock figuccio 12-24

clock ore ampm 24h al passaggio mouse

// ==UserScript==
// @name           Clock figuccio 12-24
// @description    clock ore ampm 24h al passaggio mouse
// @version        0.1
// @match          *://*/*
// @noframes
// @author         figuccio
// @grant          GM_setValue
// @grant          GM_getValue
// @grant          GM_registerMenuCommand
// @license        MIT
// @icon           data:image/gif;base64,R0lGODlhEAAQAKECABEREe7u7v///////yH5BAEKAAIALAAAAAAQABAAAAIplI+py30Bo5wB2IvzrXDvaoFcCIBeeXaeSY4tibqxSWt2RuWRw/e+UQAAOw==
// @namespace https://greasyfork.org/users/237458
// ==/UserScript==
/*  true=ampm  false=24h  */
function updateClock() {
var time = new Date().toLocaleTimeString('it', { hour12: false, });
var d = new Date();
var ms = d.getMilliseconds()
node.innerHTML =time+":" +ms;
}
let node = document.createElement('div');
////////////
node.id = "c";
node.title = '';
node.setAttribute("style","cursor:move;padding:4px;background:black;color:lime;top:0;font-family:sans-serif;font-size:14px;position:fixed;text-align:center;z-index:999999;border-radius:10px;border:2px solid yellow;");
document.body.appendChild(node);
setInterval(() => updateClock(), 70);
    //12h
function Clock() {
var time2 = new Date().toLocaleTimeString('en-US', { hour12: true,hour:'2-digit', minute:'2-digit',second:'2-digit', });
node2.innerHTML =time2;
}
let node2 = document.createElement('div');
node.id = "d";
node2.title = 'time am-pm';
node2.setAttribute("style","display:none!important;padding:4px;background:black;color:lime;top:0;font-family:sans-serif;font-size:14px;position:fixed;text-align:center;z-index:999999;border-radius:10px;border:2px solid yellow;");
document.body.appendChild(node2);
setInterval(() => Clock(), 1000);

 function Function14() { if (node.style.display === 'none') { node.style.display = 'block'; node2.style.display = 'none'; }
  else {node.style.display = 'none';node2.style.display = 'block';}
}
node.addEventListener('mouseover', Function14);//passaggio del mouse
node2.addEventListener('mouseout',Function14 );//toglie il mouse
//////////////////////////////
function Functiononoff() {node.style.display = ((node.style.display!='none') ? 'none' : 'block');}
GM_registerMenuCommand("nascondi/mostra time",Functiononoff);