facebook recent

Aggiungi pulsante per tornare su facebook

Fra 03.11.2019. Se den seneste versjonen.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Advertisement:

// ==UserScript==
// @name           facebook recent
// @author         figuccio
// @namespace https://greasyfork.org/users/237458
// @description    Aggiungi pulsante per tornare su facebook
// @version        0.4
// @include        *
// @exclude https://drive.google.com/*
// @grant       GM_addStyle
// ==/UserScript==

/*Crea un pulsante in un div contenitore. Sarà in stile e  posizionato con CSS.
*/
var zNode = document.createElement ('div');
zNode.innerHTML = '<button id="myButton" type="button">'
                + 'facerec</button>'
                ;
zNode.setAttribute ('id', 'myContainer');
document.body.appendChild (zNode);

//--- Attiva il pulsante appena aggiunto.
document.getElementById ("myButton").addEventListener (
    "click",function(){window.location.href = "https://www.facebook.com/?sk=h_chr"; (0,0); }, false);

function ButtonClickAction (zEvent) {
    /*---Per la nostra azione fittizia, aggiungeremo solo una riga di testo in alto
         dello schermo.
    */
    var zNode = document.createElement ('p');
    zNode.innerHTML = 'The button was clicked.';
    document.getElementById ("myContainer").appendChild (zNode);
}

//--- Dai uno stile ai nostri nuovi elementi aggiunti usando i CSS.
GM_addStyle (`
    #myButton {
        position:               fixed;
        top:                    0;
        left:                   0;
        text-align:             left;
        font-size:              11pt;
        font-weight:            bold;
        cursor:                 pointer;
        color:                  red!important;
        background-color:       green;
        border:                 2px solid blue;
        border-radius:          12px;
        z-index:                50000;
        padding:                6px 8px;
        text-decoration:        none;
    }
`);