-
-
Save theycallmeswift/3374148 to your computer and use it in GitHub Desktop.
Github Fit Screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var main = function () { | |
var ghresize = function (options) { | |
var ghwid = $("div#wrapper").width() | |
, extra = $("span.repo-label").width() * 2; | |
if(options && options.debug) { | |
console.log("Resizing"); | |
} | |
$("div.container.hentry").width(ghwid - extra); | |
$("div.frame.frame-center").width(ghwid - extra); | |
var old_frame = $("div.frame:not(div.frame.frame-center):not(div.frame.frame-loading)"); | |
if(old_frame.css("margin-left") == "0px") { | |
old_frame.css("margin-left", 0); | |
} else { | |
old_frame.css("margin-left", -ghwid); | |
} | |
}; | |
$("#slider").bind("slid", function() { | |
setTimeout(function() { ghresize(); }, 250); | |
}); | |
$(window).ready(function () { | |
ghresize(); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment