commit c21d6c9700d4e95aad516171324b7ffd1ddb0e78
parent fb7f9698d36043610fde058e5ebbd214ca5421ca
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 30 Dec 2016 00:58:28 -0500
Allow Cmd-R/Ctrl-R to reload page in basic viewer
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/standalone/basicViewer.js b/chrome/content/zotero/standalone/basicViewer.js
@@ -45,4 +45,13 @@ window.addEventListener("load", function() {
window.setTimeout(function() {
document.getElementById("my-browser").style.overflow = "auto";
}, 0);
-}, false);
-\ No newline at end of file
+}, 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);
+ }
+});