Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: webkit/glue/devtools/js/devtools.js

Issue 159132: DevTools: mute accidental refresh requests while on DevTools window. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/js/devtools.js
===================================================================
--- webkit/glue/devtools/js/devtools.js (revision 21168)
+++ webkit/glue/devtools/js/devtools.js (working copy)
@@ -222,10 +222,23 @@
Preferences.ignoreWhitespace = false;
oldLoaded.call(this);
+
+ // Hide dock button on Mac OS.
+ // TODO(pfeldman): remove once Mac OS docking is implemented.
if (InspectorController.platform().indexOf('mac') == 0) {
document.getElementById('dock-status-bar-item').addStyleClass('hidden');
}
+ // Mute refresh action.
+ document.addEventListener("keydown", function(event) {
+ if (event.keyIdentifier == 'F5') {
+ event.preventDefault();
+ } else if (event.keyIdentifier == 'U+0052' &&
yurys 2009/07/21 12:01:36 please use a constant for this
+ (event.ctrlKey || event.metaKey)) {
+ event.preventDefault();
+ }
+ }, true);
+
DevToolsHost.loaded();
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698