Allow Cmd-R/Ctrl-R to reload page in basic viewer
This commit is contained in:
parent
fb7f9698d3
commit
c21d6c9700
1 changed files with 10 additions and 1 deletions
|
@ -45,4 +45,13 @@ window.addEventListener("load", function() {
|
|||
window.setTimeout(function() {
|
||||
document.getElementById("my-browser").style.overflow = "auto";
|
||||
}, 0);
|
||||
}, false);
|
||||
}, false);
|
||||
|
||||
window.addEventListener("keypress", function (event) {
|
||||
// Cmd-R/Ctrl-R (with or without Shift) to reload
|
||||
if (((Zotero.isMac && event.metaKey && !event.ctrlKey)
|
||||
|| (!Zotero.isMac && event.ctrlKey))
|
||||
&& !event.altKey && event.which == 114) {
|
||||
browser.reloadWithFlags(browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue