millesimisec Clock figuccio

Clock millisecondi

// ==UserScript==
// @name            millesimisec Clock figuccio
// @description     Clock millisecondi
// @match           *://*/*
// @version         9.1
// @author         figuccio
// @noframes
// @grant          GM_setValue
// @grant          GM_getValue
// @grant          GM_registerMenuCommand
// @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==
let $ = window.jQuery;
var j = $.noConflict();
const body=document.body;

var box = document.createElement("div");
 box.id = "milli";
 box.title = 'trascina time';
box.setAttribute("style", "background:blue;color:red;cursor:move; font-family:sans-serif; font-size:13pt; top:0px; line-height:21px; position:fixed; text-align:center; z-index:999999;");
document.body.appendChild(box);
j(milli).draggable();
body.append(milli);
function tick()
{
   var today = new Date();
  var h = today.getHours();
  var m = today.getMinutes();
  var s = today.getSeconds();
  var ms = today.getMilliseconds();
m = checkTime(m);
s = checkTime(s);
 function checkTime(i) {
  if (i < 10) {i = "0" + i}; // aggiungi zero davanti ai numeri < 10
  return i;
}
var options = {'weekday': 'long', 'month': 'long', 'day': '2-digit','year':'numeric'};
var date = new Date().toLocaleString('it-IT', options);
	box.innerHTML = h + ":" + m + ":" + s+ ":" + ms + " "+date;
}


tick();
setInterval(tick, 70);
    //mostra nascondi time
    function myFunction2() {
box.style.display = ((box.style.display!='none') ? 'none' : 'block');
}
GM_registerMenuCommand("mostra/nascondi",myFunction2);
///////////////