mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-04-27 19:53:42 +03:00
Replace page action with action
This commit is contained in:
parent
35b98d82f7
commit
fae02a6d27
|
@ -22,9 +22,9 @@
|
||||||
"devtools-remote": {
|
"devtools-remote": {
|
||||||
"description": "Remote DevTools"
|
"description": "Remote DevTools"
|
||||||
},
|
},
|
||||||
"_execute_page_action": {
|
"_execute_action": {
|
||||||
"suggested_key": {
|
"suggested_key": {
|
||||||
"default": "Ctrl+Shift+E"
|
"default": "Ctrl+Shift+F"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,8 +12,10 @@ chrome.commands.onCommand.addListener((shortcut) => {
|
||||||
openDevToolsWindow(shortcut as DevToolsPosition);
|
openDevToolsWindow(shortcut as DevToolsPosition);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create the context menu when installed
|
// Disable the action by default and create the context menu when installed
|
||||||
chrome.runtime.onInstalled.addListener(() => {
|
chrome.runtime.onInstalled.addListener(() => {
|
||||||
|
chrome.action.disable();
|
||||||
|
|
||||||
syncOptions().get((option) => {
|
syncOptions().get((option) => {
|
||||||
if (option.showContextMenus) createMenu();
|
if (option.showContextMenus) createMenu();
|
||||||
});
|
});
|
||||||
|
|
|
@ -605,8 +605,8 @@ function onConnect<S, A extends Action<string>>(port: chrome.runtime.Port) {
|
||||||
if (msg === 'heartbeat') return;
|
if (msg === 'heartbeat') return;
|
||||||
if (msg.name === 'INIT_INSTANCE') {
|
if (msg.name === 'INIT_INSTANCE') {
|
||||||
if (typeof id === 'number') {
|
if (typeof id === 'number') {
|
||||||
chrome.pageAction.show(id);
|
chrome.action.enable(id);
|
||||||
chrome.pageAction.setIcon({ tabId: id, path: 'img/logo/38x38.png' });
|
chrome.action.setIcon({ tabId: id, path: 'img/logo/38x38.png' });
|
||||||
}
|
}
|
||||||
if (isMonitored) port.postMessage({ type: 'START' });
|
if (isMonitored) port.postMessage({ type: 'START' });
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user