Add reload context menu item

This commit is contained in:
narcolepticinsomniac 2020-02-11 09:42:05 -05:00
parent 438fdebc5c
commit bd44f041d5
2 changed files with 10 additions and 0 deletions

View File

@ -1145,6 +1145,10 @@
"message": "Temporarily applies the changes without saving.\nSave the style to make the changes permanent.",
"description": "Tooltip for the checkbox in style editor to enable live preview while editing."
},
"reload": {
"message": "Reload Stylus extension",
"description": "Context menu reload"
},
"replace": {
"message": "Replace",
"description": "Label before the replace input field in the editor shown on Ctrl-H"

View File

@ -187,6 +187,7 @@ browserCommands = {
styleDisableAll(info) {
prefs.set('disableAll', info ? info.checked : !prefs.get('disableAll'));
},
reload: () => chrome.runtime.reload(),
};
// *************************************************************************
@ -208,6 +209,11 @@ contextMenus = {
title: 'openOptions',
click: browserCommands.openOptions,
},
'reload': {
presentIf: () => localStorage.installType !== 'normal',
title: 'reload',
click: browserCommands.reload,
},
'editor.contextDelete': {
presentIf: () => !FIREFOX && prefs.get('editor.contextDelete'),
title: 'editDeleteText',