Clock1

Clock in basso alle pagine colore blu e rosso

目前為 2022-07-04 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           Clock1
// @description    Clock in basso alle pagine colore blu e rosso
// @author         figuccio
// @version        0.3
// @match          *://*/*
// @grant          GM_setValue
// @grant          GM_getValue
// @require        http://code.jquery.com/jquery-latest.js
// @require        https://code.jquery.com/ui/1.12.1/jquery-ui.js
// @license                  MIT
// @namespace      https://greasyfork.org/users/237458
// ==/UserScript==
let $ = window.jQuery;
var j = $.noConflict();
const body=document.body;
if (window.top != window.self) return;
var box = document.createElement("div");
box.setAttribute("style","top:500px;margin:10px;color:red;border-radius:10px;border:2px solid green;font-family:sans-serif;font-size:16pt;background-color:blue;position:fixed;text-align:center;z-index:99999;");
document.body.appendChild(box);

function tick()
{
	var d = new Date();
	var h = d.getHours();
	var m = d.getMinutes();
    var s = d.getSeconds();
    var D = d.getDate();//giorno settimana

  var DataAttuale = new Date();
  var Giorni = ["domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"]
  var NumeroGiornoAttuale = DataAttuale.getDay();
  var GiornoAttuale = Giorni[NumeroGiornoAttuale];

  var Datamese = new Date();
  var Mesi = ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"]
  var NumeroMeseAttuale = DataAttuale.getMonth();
  var MeseAttuale = Mesi[NumeroMeseAttuale];
         //anno
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()+1
if (month<10)
month="0"+month
var daym=mydate.getDate()
if (daym<10)


	if (h < 10) h = "0" + h;
	if (m < 10) m = "0" + m;
    if (s < 10) s = "0" + s;
	box.innerHTML =GiornoAttuale + " " +D + " "+MeseAttuale + " " +year + " " + h + ":" + m + ":" + s
}
j(box).draggable();
body.append(box);
tick();
setInterval(tick, 1000);