Skip to content

Instantly share code, notes, and snippets.

@sherzberg
Last active August 29, 2015 14:18
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 sherzberg/777402c41f2d4f90319a to your computer and use it in GitHub Desktop.
Save sherzberg/777402c41f2d4f90319a to your computer and use it in GitHub Desktop.
Github Fixed Header TamperMonkey Script
// ==UserScript==
// @name Github Fixed Header
// @namespace http://github.com/sherzberg
// @version 0.2
// @description This script forces the Github header to be fixed. Very useful for long thread or long file viewing.
// @author Spencer Herzberg
// @match https://github.com/*
// @grant none
// ==/UserScript==
$(document).ready(function() {
var start_of_content = $('#start-of-content');
start_of_content.after("<div style='height: 50px'></div>");
var header = $('.header');
header.css('position', 'fixed');
header.css('z-index', '1005');
header.css('width', '100%');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment