facebook logout cookie

pulsante logout facebook

// ==UserScript==
// @name          facebook logout cookie
// @description   pulsante logout facebook
// @author        figuccio
// @version       0.6
// @namespace https://greasyfork.org/users/237458
// @include        https://*.facebook.com/*
// @noframes
// @grant         GM_addStyle
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_registerMenuCommand
// ==/UserScript==
var Bar = document.getElementsByClassName("_2t-f")[0];
var f = document.createElement('span');
f.innerHTML = "esci";
var c ='color:yellow!important;font-size:14px;cursor:pointer;font-weight:bold;text-decoration:none;margin-top:10px';
f.style.cssText = c;
f.title = 'logout facebook';
f.addEventListener('click', function(){window.location.href =document.cookie = "c_user= ; domain=.facebook.com;max-age=gio, 01 gen 1970 00:00:00 GMT";});
Bar.appendChild(f);

 function Functionlogout() {
 if (f.style.display === 'none') {
   f.style.display = 'block';
  } else {
    f.style.display = 'none';
  }
}
GM_registerMenuCommand("mostra logout/nascondi logout",Functionlogout);