mirror of https://github.com/gorhill/uBlock.git
Change net monitor menu label to be independent, and to be "Block Resource"
This commit is contained in:
parent
c98ff26709
commit
424f13178a
|
@ -1944,10 +1944,10 @@ vAPI.contextMenu.displayMenuItem = function({target}) {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
vAPI.contextMenu.createContextMenuItem = function(doc) {
|
||||
vAPI.contextMenu.createContextMenuItem = function(doc, labelOverride) {
|
||||
var menuitem = doc.createElement('menuitem');
|
||||
menuitem.setAttribute('id', this.menuItemId);
|
||||
menuitem.setAttribute('label', this.menuLabel);
|
||||
menuitem.setAttribute('label', labelOverride || this.menuLabel);
|
||||
menuitem.setAttribute('image', vAPI.getURL('img/browsericons/icon16.svg'));
|
||||
menuitem.setAttribute('class', 'menuitem-iconic');
|
||||
return menuitem;
|
||||
|
@ -2038,7 +2038,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);
|
||||
var menuitem = vAPI.contextMenu.createContextMenuItem(doc, vAPI.i18n('netMonitorContextMenuEntry'));
|
||||
menuitem.addEventListener('command', function() {
|
||||
var selectedRequest = panel.panelWin.NetMonitorView.RequestsMenu.selectedAttachment;
|
||||
if (selectedRequest) {
|
||||
|
|
|
@ -147,6 +147,10 @@
|
|||
"message":"Block element",
|
||||
"description":"English: Block element"
|
||||
},
|
||||
"netMonitorContextMenuEntry":{
|
||||
"message":"Block resource",
|
||||
"description":"English: Block resource"
|
||||
},
|
||||
"settingsCollapseBlockedPrompt":{
|
||||
"message":"Hide placeholders of blocked elements",
|
||||
"description":"English: Hide placeholders of blocked elements"
|
||||
|
|
|
@ -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']
|
||||
title_case_strings = ['pickerContextMenuEntry', 'netMonitorContextMenuEntry']
|
||||
|
||||
for alpha2 in sorted(os.listdir(source_locale_dir)):
|
||||
locale_path = pj(source_locale_dir, alpha2, 'messages.json')
|
||||
|
|
Loading…
Reference in New Issue