clock Facebook figuccio data-time

data ora calendario

目前為 2022-11-06 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name          clock Facebook figuccio data-time
// @namespace     https://greasyfork.org/users/237458
// @version       0.4
// @author        figuccio
// @description   data ora calendario
// @match         https://*.facebook.com/*
// @match         https://*.facebook.com/me/*
// @grant         GM_addStyle
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_registerMenuCommand
// @require       https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
// @run-at        document-start
// @require       http://code.jquery.com/jquery-latest.js
// @require       https://code.jquery.com/ui/1.12.1/jquery-ui.js
// @icon          data:image/gif;base64,R0lGODlhEAAQAKECABEREe7u7v///////yH5BAEKAAIALAAAAAAQABAAAAIplI+py30Bo5wB2IvzrXDvaoFcCIBeeXaeSY4tibqxSWt2RuWRw/e+UQAAOw==
// @require       https://greasyfork.org/scripts/12228/code/setMutationHandler.js
// @noframes
// @license        MIT
// ==/UserScript==
   ///////////////////////time///////////
var $g = jQuery.noConflict();
$g(document).ready(function() {
'use strict';
var $ = window.jQuery;
var jg = $.noConflict();
var body=document.body;
var style="position:fixed; top:-13px;margin-left:760px;z-index:99999;"
var box=document.createElement("div");

box.id="mydata";
box.style=style;
jg(box).draggable();
body.append(box);

function prova(){
 if(mydata.style.display = (mydata.style.display!='none') ? 'none' : 'block');}
GM_registerMenuCommand("nascondi/mostra time",prova);
///////////////////////////////////////////////////////////////
   //Imposta lo stile CSS degli elementi nel menu
        GM_addStyle(`
  #setui{width:auto;height:25px; margin-top:-12px;margin-left:-12px; margin-right:-12px;margin-bottom:0px;border-width:1px;}

       input[type="datetime-local"] { background:#3b3b3b;color:lime;border:1px solid yellow; border-radius: 5px;margin:9px;text-align:center;}

            `);

setInterval(function(){
let today = new Date();
today.setMinutes(today.getMinutes() - today.getTimezoneOffset());
document.getElementById('datePicker1').value = today.toISOString().slice(0, -1);
}, 70);

 //elemento html nel div readonly datatime non fa comparire licona del calendario
    box.innerHTML=`
                      </p>
                              <fieldset style="background:#3b3b3b; border: 2px solid red;color:lime;border-radius:7px;text-align:center;">
                              <legend>DATA-TIME</legend>
   <div id=setui>

 <input readonly id="datePicker1" type="datetime-local" />

                                                    </p>
                    </div>
                    </fieldset>
            `;

})();