Greasy Fork is available in English.

clock barra Facebook

Facebook clock

Pada tanggal 19 April 2020. Lihat %(latest_version_link).

// ==UserScript==
// @name           clock barra Facebook
// @namespace      https://greasyfork.org/users/237458
// @description    Facebook clock
// @include        http://*.facebook.com/*
// @include        https://*.facebook.com/*
// @author         figuccio
// @version        0.2
// @grant          GM_addStyle
// @grant          GM_setValue
// @grant          GM_getValue
// @grant          GM_registerMenuCommand
// ==/UserScript==
/*   */
var blueBar = document.getElementsByClassName("_2t-f")[0];

var A = document.createElement("button");
A.title ='1click per salire in alto doppio click per post recenti';
var e ='background-color:green;color:red!important;height:20px;margin-Top:13px;border:1px solid yellow;font-size:14px;border-radius:12px;';
A.style.cssText = e;


blueBar.appendChild(A);

function clockTime() {
        var today = new Date();
        var h = today.getHours();
        var m = today.getMinutes();
        var s = today.getSeconds();
        var milli = today.getMilliseconds()
        var date = new Date().toLocaleDateString();
        if (h < 10) h = "0" + h;
        if (m < 10) m = "0" + m;
        if (s < 10) s = "0" + s;
        A.innerText = h + ":" + m + ":" + s+ ":" +milli+ " "+date;;
        setTimeout(clockTime, 70);
    }
    clockTime();

      //funzione torna il alto
A.addEventListener('click', function(){ window.scrollTo(0,0);});
      //funzione ordina facebook recenti fare doppio click
A.addEventListener('dblclick', function(){ window.location.href = "https://www.facebook.com/?sk=h_chr";});