Merge pull request #339 from geeyan/master

while use locally, no need of ribbon
This commit is contained in:
Stéphane Goetz 2016-01-08 13:01:13 +01:00
commit c4f8b22697

View File

@ -108,12 +108,14 @@ $(function () {
function onResize() {
//Fix GitHub Ribbon overlapping Scrollbar
var a = $('article');
if (ribbon[0] && a[0] && a[0].scrollHeight > $('.right-column').height()) {
if (ribbon.length && a.length) {
if (a[0] && a[0].scrollHeight > $('.right-column').height()) {
ribbon[0].style.right = '16px';
} else {
ribbon[0].style.right = '';
}
}
}
$(window).resize(_.debounce(onResize, 100));
onResize();
});