data ora calendario
当前为
// ==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>
`;
})();