您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
clock ore minuti secondi data
当前为
- // ==UserScript==
- // @name Clock figuccio
- // @description clock ore minuti secondi data
- // @version 1.1.4
- // @include *
- // @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 */
- if (window.top != window.self) //eseguire solo su frame principale (evita doppio dispay)
- return;
- const clockSettings = {
- fontSize: '15px',
- is12hour: false,
- backgroundcolor:"red",
- }
- 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');
- function setStyles(styles) {
- styles.forEach(style => node.style.setProperty(style.name, style.value));
- }
- setStyles([
- { name: 'top', value: '0'},{ name: 'left', value: '0'},{ name: 'bottom', value: '' },//sopra
- //{ name: 'bottom', value: '0' },{ name: 'right', value: ''},//sotto
- { name: 'color', value: 'white' },{name: 'z-index', value: '99999' },{ name: 'position', value: 'fixed'},
- { name:'padding-top', value:'5px'},{name:'padding-right',value:'5px'},{name:'padding-bottom',value:'5px'},{name:'padding-left',value:'5px'},
- { name: 'border-radius', value: '10px' },{ name: 'border', value: '2px solid blue' },{ name: 'background-color', value:clockSettings.backgroundcolor },
- { name: 'margin',value: '0px 12cm'},{ name:'font-size',value:clockSettings.fontSize },
- ]);
- document.body.appendChild(node);
- setInterval(() => updateClock(), 1000);
- /* effetti speciali
- node.addEventListener("mouseover", function( event ) {
- // evidenzia il bersaglio del mouseover
- event.target.style.color = "orange";
- event.target.style.background = "green";
- event.target.style.border= "solid black";
- // ripristinare il colore dopo un breve ritardo
- setTimeout(function() {
- event.target.style.color = "white";
- event.target.style.background = "red";
- event.target.style.border = "solid blue";
- }, 7000);
- }, false);
- */
- //nasconde orario al click del mouse per 9secondi
- node.addEventListener("click", function( event ) {
- event.target.style.display= "none";
- setTimeout(function() {
- event.target.style.display= "block";
- }, 9000);
- }, false);