Clock figuccio

clock ore minuti secondi millesimi data

As of 2022-10-24. See the latest version.

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!)

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!)

// ==UserScript==
// @name          Clock figuccio
// @description   clock ore minuti secondi millesimi data
// @version        2.5
// @match          *://*/*
// @noframes
// @author        figuccio
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_registerMenuCommand
// @icon          data:image/gif;base64,R0lGODlhEAAQAKECABEREe7u7v///////yH5BAEKAAIALAAAAAAQABAAAAIplI+py30Bo5wB2IvzrXDvaoFcCIBeeXaeSY4tibqxSWt2RuWRw/e+UQAAOw==
// @namespace     https://greasyfork.org/users/237458
// @require       http://code.jquery.com/jquery-latest.js
// @require       https://code.jquery.com/ui/1.12.1/jquery-ui.js
// @license                  MIT
// ==/UserScript==
/* short long  true=ampm  false=24h lingua en-US ok am pm mezzogiorno 12:00 .lingua it mezzogiorno ampm 0:00  */
var $ = window.jQuery;
var j = $.noConflict();
const body=document.body;
function updateClock() {
var data = new Date().toLocaleString('it', {'day':'2-digit','year':'numeric','month':'long','weekday':'long'});
document.getElementById('Clocktest').innerHTML =data
}
var node = document.createElement('div');
////////////
node.id = "Clocktest";
node.title = 'click time';
node.setAttribute("style","cursor:move;padding:4px;background:black;color:lime;font-family: Orbitron;letter-spacing: 2px;top:0;font-size:14px;position:fixed;text-align:center;z-index:999999;border-radius:10px;border:2px solid red;");
document.body.appendChild(node);
setInterval(updateClock, 1000);
j(node).draggable();
body.append(node);
////////////////////////////////////////////////
function Clock() {
  var date = new Date();
  var mm;
  mm = date.getMilliseconds();
  var ore = date.toLocaleString('it',{
  hour:'2-digit',minute:'numeric',second:'numeric',
  });
 document.getElementById('b') .innerHTML = ore+":"+ mm;;
}
var node2 = document.createElement('div');
node2.id = "b";
node2.title = 'trascina time+click data';
node2.setAttribute("style","cursor:move;padding:4px;background:black;color:lime;top:0px;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, 70);
////////////////////////////
  j(node2).draggable();
   body.append(node2);
////////////////////////
function Function149() {
  if (node.style.display === 'none') {node.style.display ='block'; node2.style.display ='none';} else {node.style.display ='none';node2.style.display ='block';}
}

//funziona cambia data-ora al click
node2.addEventListener("click", Function149);
node.addEventListener("click", Function149);
node.style.display = 'none';