您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Press Alt to logout
当前为
// ==UserScript== // @name Facebook Logout figuccio Shortcut Press Alt // @namespace https://greasyfork.org/users/237458 // @version 0.1 // @author figuccio // @description Press Alt to logout // @include https*://*.facebook.com/* // @grant none // ==/UserScript== window.onload = function(){ document.getElementById('userNavigationLabel').click(); document.getElementById('userNavigationLabel').click(); } var eventUtility = { addEvent : function(el, type, fn) { if (typeof addEventListener !== "undefined") { el.addEventListener(type, fn, false); } else if (typeof attachEvent !== "undefined") { el.attachEvent("on" + type, fn); } else { el["on" + type] = fn; } } }; (function() { eventUtility.addEvent(document, "keydown", function(evt) { var code = evt.keyCode, altKey = evt.altKey; if (altKey) { console.log("logging out!"); document.forms[document.forms.length-1].submit(); } }); }());