Skip to content

Instantly share code, notes, and snippets.

@killua99
Last active December 19, 2015 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save killua99/5913850 to your computer and use it in GitHub Desktop.
Save killua99/5913850 to your computer and use it in GitHub Desktop.
Facebook menu Fixer is a script that put an icon in the top bar to fix the sidebar menu when you're scrolling. Use this script with greasemonkey or tampermonkey.
// ==UserScript==
// @name facebook menu
// @namespace http://killua.me/
// @description Keep the menu aviable without scroll
// @include http*facebook.com/
// @include http*facebook.com/?sk=nf
// @include http*facebook.com/lists/*
// @include http*facebook.com/groups/*
// @version 1
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// ==/UserScript==
/**
* Menu fixer for facebook. Allow you to keep the menu when you need.
*/
(function ($) {
$('#pageHead').prepend('<img id="killua-menu" style="border: 1px solid #222; cursor: pointer; float: left; margin: 0 4px; height: 21px; width: 21px; " src="http://dl.dropbox.com/u/9861549/menu-fb-icon.png" />');
$myobject = $('#leftCol');
$demenu = $('#killua-menu');
$demenu.bind('click', function() {
$myobject.css('position', 'fixed');
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment