mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-18 07:14:26 +01:00
Fixed glitches with headings by replacing a CSS hack by a JS solution.
This commit is contained in:
@@ -56,4 +56,11 @@ function toggleClassified(el){
|
||||
btn.addClass("btn-danger");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function updatePosition(){
|
||||
// document.getElementById(…) is used over $('#'+…) in order to reduce attack surface: It does not look like a good idea to pass untrusted input to “omnipotent” `$` function.
|
||||
$.scrollTo(document.getElementById(location.hash.substr(1)), {offset: -$('#navbar').height()});
|
||||
}
|
||||
$(window).bind('hashchange', function(e) { updatePosition(); });
|
||||
$(window).bind('load', function(e) { updatePosition(); });
|
||||
Reference in New Issue
Block a user