1
0
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:
Kris Maglione
2010-10-04 16:45:39 -04:00
parent 1d5eb0f991
commit 476c908da1
9 changed files with 34 additions and 22 deletions

View File

@@ -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);