Merge pull request #339 from geeyan/master
while use locally, no need of ribbon
This commit is contained in:
commit
c4f8b22697
@ -108,10 +108,12 @@ $(function () {
|
|||||||
function onResize() {
|
function onResize() {
|
||||||
//Fix GitHub Ribbon overlapping Scrollbar
|
//Fix GitHub Ribbon overlapping Scrollbar
|
||||||
var a = $('article');
|
var a = $('article');
|
||||||
if (ribbon[0] && a[0] && a[0].scrollHeight > $('.right-column').height()) {
|
if (ribbon.length && a.length) {
|
||||||
ribbon[0].style.right = '16px';
|
if (a[0] && a[0].scrollHeight > $('.right-column').height()) {
|
||||||
} else {
|
ribbon[0].style.right = '16px';
|
||||||
ribbon[0].style.right = '';
|
} else {
|
||||||
|
ribbon[0].style.right = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(window).resize(_.debounce(onResize, 100));
|
$(window).resize(_.debounce(onResize, 100));
|
||||||
|
Loading…
Reference in New Issue
Block a user