diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/76-hotkeys.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/76-hotkeys.js new file mode 100644 index 0000000..593dbbd --- /dev/null +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/76-hotkeys.js @@ -0,0 +1,7 @@ +'use strict'; + +chrome.commands.onCommand.addListener((command) => { + if (command === 'toggle-pac-script') { + console.log("Toggling PAC-script!"); + } +}); diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/manifest.tmpl.json b/extensions/chromium/runet-censorship-bypass/src/extension-common/manifest.tmpl.json index ac57fe3..e6e433f 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/manifest.tmpl.json +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/manifest.tmpl.json @@ -27,6 +27,14 @@ "strict_min_version": "91.1.0" } }, + "commands": { + "toggle-pac-script": { + "suggested_key": { + "default": "Alt+P" + }, + "description": "Turn on/off current PAC-script" + } + }, "background": { ${persistent} @@ -40,9 +48,10 @@ ${scripts_2x} , "35-pac-kitchen-api.js" , "37-sync-pac-script-with-pac-provider-api.js" - ${scripts_8x} , "70-menu-items.js" , "75-context-menus.js" + , "76-hotkeys.js", + ${scripts_8x} ] }, diff --git a/extensions/chromium/runet-censorship-bypass/src/templates-data.js b/extensions/chromium/runet-censorship-bypass/src/templates-data.js index e45071c..60e7409 100644 --- a/extensions/chromium/runet-censorship-bypass/src/templates-data.js +++ b/extensions/chromium/runet-censorship-bypass/src/templates-data.js @@ -28,7 +28,7 @@ exports.contexts.full = Object.assign({}, commonContext, { persistent: '', scripts_0x: '', scripts_2x: ', "20-ip-to-host-api.js"', - scripts_8x: ', "80-error-menu.js", "83-last-errors.js", "85-block-informer.js"', + scripts_8x: '"80-error-menu.js", "83-last-errors.js", "85-block-informer.js"', }); exports.contexts.mini = Object.assign({}, commonContext, {