Skip to content

Instantly share code, notes, and snippets.

@mikermcneil
Created May 17, 2012 19:33
Show Gist options
  • Save mikermcneil/2721130 to your computer and use it in GitHub Desktop.
Save mikermcneil/2721130 to your computer and use it in GitHub Desktop.
Bookmarklet to make github's desktop interface responsive
javascript:function octoresponsive() {
$(".container, #slider .frames .frame, #slider .frames, .container.hentry, .avatar-bubble, html,body").css({width:'100%','minWidth':0,'paddingLeft':0}); $("#slider .frames .frame").css({'margin-right':0});
$(".columns.browser .sidebar").css({width:'20%',paddingRight:'2%'});
$(".columns.browser .main").css({width:'70%'});
}
function twitterresponsive(){
$(".wrapper, .wrapper-narrow, .wrapper-permalink").css({width:'100%',paddingLeft:0, paddingRight:0});
$(".dashboard").css({width:'30%',paddingRight:0, paddingLeft: 0});
$(".content-main").css({width:'70%',paddingRight:0,paddingLeft: 0});
$(".twitter-anywhere-tweet-box-editor").css({width:"90%"});
}
function iosdevcenterresponsive() {
if (window.location.hostname=="developer.apple.com") {
}
}
window.setInterval(function(){octoresponsive(); twitterresponsive(); iosdevcenterresponsive();},300);
@mikermcneil
Copy link
Author

got rid of the right margin

@mikermcneil
Copy link
Author

switched to width:100% to fix weird shrinking of .gitignore files

@mikermcneil
Copy link
Author

If anyone wants to watch the haschange/html5 history api event for when the user navigates, and retrigger the bookmarklet, that would be sweet

@mikermcneil
Copy link
Author

nm just hacked it w/ setinterval

@mikermcneil
Copy link
Author

added % widths to 2 column layout (issue page)

@mikermcneil
Copy link
Author

Added support for twitter as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment