Allow Cmd-R/Ctrl-R to reload page in basic viewer

This commit is contained in:
Dan Stillman 2016-12-30 00:58:28 -05:00
parent fb7f9698d3
commit c21d6c9700

View file

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