Clock figuccio

clock ore minuti secondi data

目前為 2019-12-27 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        Clock figuccio
// @description clock ore minuti secondi data
// @version     1.1.7
// @include     *
// @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
// ==/UserScript==
/*inserire questo per disattivare alcune funzioni allinizio e alla fine del codice */
 const clockSettings = {
  is12hour: false,
}
function updateClock() {
  let date = new Date();
  let time = date.toLocaleString('it',{
      hour:'2-digit',minute:'numeric',second:'numeric',
      day:'2-digit',year:'numeric',month:'long',weekday:'long',
      hour12: clockSettings.is12hour
  });
  node.innerHTML = time;
}
let node = document.createElement('div');
node.setAttribute("style", "bottom: ;background:red;color:white;font-family:sans-serif;font-size:15px;top:0;right:0;position:fixed;text-align:center;z-index:999999;padding:5;border-radius:10px;border:2px solid blue;padding:5px;");
document.body.appendChild(node);

setInterval(() => updateClock(), 1000);
                         //menu comandi mostra nascondi time
function hide() {node.style.display ='none';}
GM_registerMenuCommand("nascondi",hide);
function show() {node.style.display = 'block';}
GM_registerMenuCommand("mostra",show);
                //posizione
 function cambio2() {node.style.margin= " 0px";}
GM_registerMenuCommand("in alto ►",cambio2);
                //posizione 580px 0px
 function cambio() {node.style.margin= "15cm 0px";}
GM_registerMenuCommand("in basso ►",cambio);
function left () {node.style.margin= " 0px 33cm";}
GM_registerMenuCommand("left in alto ◄",left);

function left2 () {node.style.margin= " 480px 33cm";}
GM_registerMenuCommand("left in basso◄",left2);