您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
digital clock e la data facoltativa in basso a destra sullo schermo
当前为
// ==UserScript== // @name Digital Clock & Date figuccio // @namespace https://gf.qytechs.cn/users/237458 // @description digital clock e la data facoltativa in basso a destra sullo schermo // @include * // @version 1.0 // @noframes // @grant GM_getValue // @grant GM_registerMenuCommand // @grant GM_setValue // @grant GM_xmlhttpRequest // ==/UserScript== var AM_PM = false; // "true" TO MAKE TIME AM/PM 12am-12pm. // "false" FOR MILITARY TIME 00:00-24:00 var use_date = true; // "true" to add date to page, "false" to not var date_arrangement = "weekday day month year"; // Ordina data left to right if(document.getElementById("digital_clock") !== null) throw ""; var time_box = document.createElement("div"); time_box.setAttribute("id", "digital_clock"); time_box.setAttribute("style","position:fixed;bottom:0px;right:0px;padding:5px;color:lime;background:black;border:1px solid red;border-radius:6px;font-size:14px;font-family:sans-serif, arial, verdana; z-index:99999999;"); document.body.insertBefore(time_box, document.body.firstChild); date_arrangement = date_arrangement.toLowerCase().split(" "); function setTime() { var period = "", DateArr = new Array(), fulldate = "", date = new Date(); DateArr["hours"] = date.getHours(), DateArr["minutes"] = date.getMinutes().toString(), DateArr["seconds"] = date.getSeconds().toString(); // Renderlo am / pm se l'impostazione è attiva if(AM_PM) { if(DateArr["hours"]>12) {DateArr["hours"]-=12; period=" pm";} else period=" am"; if(DateArr["hours"]==0) DateArr["hours"]=12; } DateArr["hours"] = DateArr["hours"].toString(); if(DateArr["hours"].length==1 && !AM_PM) DateArr["hours"]="0"+DateArr["hours"]; // Correct the 1 digit glitch if(DateArr["minutes"].length==1) DateArr["minutes"]="0"+DateArr["minutes"]; // Correct the 1 digit glitch if(DateArr["seconds"].length==1) DateArr["seconds"]="0"+DateArr["seconds"]; // Correct the 1 digit glitch // Gestire la disposizione della data if(use_date === true) { var Regexs = { weekday : /(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/, month : /(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/, day : /(\d+) 20\d{2}/, year : /20\d{2}/ }, date = Date(); for(var i=0, l = date_arrangement.length; i < l; i++) { switch(date_arrangement[i]) { case "weekday": fulldate += date.match(Regexs["weekday"])[0] + ", "; break; case "month": fulldate += date.match(Regexs["month"])[0] + " "; break; case "day": fulldate += date.match(Regexs["day"])[1] + " "; break; case "year": fulldate += date.match(Regexs["year"])[0] + " "; break; } } if(fulldate === "") fulldate = date; } time_box.textContent = DateArr["hours"]+":"+DateArr["minutes"]+":"+DateArr["seconds"]+period+ (use_date?(" - "+fulldate):""); // Aggiungi data se abilitato window.setTimeout(setTime, 1000); } window.setTimeout(setTime, 0); //mostra nascondi orologio function myFunctiont() { if (time_box.style.display === 'none') { time_box.style.display = 'block'; } else { time_box.style.display = 'none'; } } GM_registerMenuCommand("nascondi/mostra",myFunctiont); //sposta su e giu function myFunctiontu() { if (time_box.style.bottom === '595px') { time_box.style.bottom = '0px'; } else { time_box.style.bottom = '595px'; } } GM_registerMenuCommand("su/giu",myFunctiontu);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址