From 801e6d706f494017914609b3238e14b3ab5b2f71 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 14 May 2015 17:04:15 -0600 Subject: [PATCH] Change back to 'Block Element' until later (details:...) until we have a more general 'element picker' equivalent that can block resources. So having this exposed in the request logger would be basically useless (since the only type of stuff that one would want to block using the request logger are probably things that aren't visible DOM elements) --- platform/firefox/vapi-background.js | 6 +++--- src/_locales/en/messages.json | 4 ---- src/css/devtool-log.css | 8 ++++---- src/js/devtool-log.js | 4 +--- tools/make-firefox-meta.py | 2 +- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index c9972c1e4..193708d6e 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1943,10 +1943,10 @@ vAPI.contextMenu.displayMenuItem = function({target}) { /******************************************************************************/ -vAPI.contextMenu.createContextMenuItem = function(doc, labelOverride) { +vAPI.contextMenu.createContextMenuItem = function(doc) { var menuitem = doc.createElement('menuitem'); menuitem.setAttribute('id', this.menuItemId); - menuitem.setAttribute('label', labelOverride || this.menuLabel); + menuitem.setAttribute('label', this.menuLabel); menuitem.setAttribute('image', vAPI.getURL('img/browsericons/icon16.svg')); menuitem.setAttribute('class', 'menuitem-iconic'); return menuitem; @@ -2037,7 +2037,7 @@ vAPI.contextMenu.registerForNetMonitor = function(eventName, toolbox, panel) { var insertBeforeMenuItem = doc.getElementById("request-menu-context-separator"); if (menuPopup && insertBeforeMenuItem) { - var menuitem = vAPI.contextMenu.createContextMenuItem(doc, vAPI.i18n('netLoggerBlockResourcePrompt')); + var menuitem = vAPI.contextMenu.createContextMenuItem(doc); menuitem.addEventListener('command', function() { var selectedRequest = panel.panelWin.NetMonitorView.RequestsMenu.selectedAttachment; if (selectedRequest) { diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 6f49658ab..80d48550a 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -147,10 +147,6 @@ "message":"Block element", "description":"English: Block element" }, - "netLoggerBlockResourcePrompt":{ - "message":"Block resource", - "description":"English: Block resource" - }, "settingsCollapseBlockedPrompt":{ "message":"Hide placeholders of blocked elements", "description":"English: Hide placeholders of blocked elements" diff --git a/src/css/devtool-log.css b/src/css/devtool-log.css index 5ddf9c9d8..7203062f5 100644 --- a/src/css/devtool-log.css +++ b/src/css/devtool-log.css @@ -85,11 +85,11 @@ input:focus { #content table tr.allowed { background-color: rgba(0, 160, 0, 0.1); } -#content table tr.allowed.mirrored { - background-color: rgba(255, 255, 0, 0.3); +#content table tr.neutral { + cursor: pointer; } -#content table tr.maindoc { - background-color: #eee; +#content table tr.neutral:hover { + background-color: rgba(80, 80, 80, 0.1); } #content table tr.cosmetic { background-color: rgba(255, 255, 0, 0.1); diff --git a/src/js/devtool-log.js b/src/js/devtool-log.js index 7eb48781c..2c7915106 100644 --- a/src/js/devtool-log.js +++ b/src/js/devtool-log.js @@ -156,11 +156,9 @@ var renderLogEntry = function(entry) { tr.cells[0].textContent = ' -\u00A0'; } else if ( entry.result.charAt(1) === 'a' ) { tr.classList.add('allowed'); - if ( entry.result.charAt(0) === 'm' ) { - tr.classList.add('mirrored'); - } tr.cells[0].textContent = ' +\u00A0'; } else { + tr.classList.add('neutral'); tr.cells[0].textContent = ''; } diff --git a/tools/make-firefox-meta.py b/tools/make-firefox-meta.py index 0732f7e53..f8ec3ed2b 100644 --- a/tools/make-firefox-meta.py +++ b/tools/make-firefox-meta.py @@ -24,7 +24,7 @@ source_locale_dir = pj(build_dir, '_locales') target_locale_dir = pj(build_dir, 'locale') language_codes = [] descriptions = OrderedDict({}) -title_case_strings = ['pickerContextMenuEntry', 'netLoggerBlockResourcePrompt'] +title_case_strings = ['pickerContextMenuEntry'] for alpha2 in sorted(os.listdir(source_locale_dir)): locale_path = pj(source_locale_dir, alpha2, 'messages.json')