mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-03 11:24:12 +01:00
Make 'mapleader' an option and fix the help fragment scrolling issue.
This commit is contained in:
@@ -8,8 +8,13 @@ function checkFragment() {
|
||||
document.title = document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "title")[0].textContent;
|
||||
var frag = document.location.hash.substr(1);
|
||||
var elem = document.getElementById(frag);
|
||||
if (elem)
|
||||
function action() {
|
||||
window.content.scrollTo(0, window.content.scrollY + elem.getBoundingClientRect().top - 10); // 10px context
|
||||
}
|
||||
if (elem) {
|
||||
action();
|
||||
setTimeout(action, 10);
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener("load", checkFragment, true);
|
||||
|
||||
Reference in New Issue
Block a user