hotkeys.js: use DOMContentLoaded so images don't delay script
Instead of the load event, which waits until all assets are finished loading in order for script to start.
This commit is contained in:
@@ -27,6 +27,6 @@ function onKeyDown(e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('DOMContentLoaded', function() {
|
||||||
document.addEventListener('keydown', onKeyDown);
|
document.addEventListener('keydown', onKeyDown);
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user