From cd3d36dcb1d7144d6a8db03e562073617fb081b6 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 11 Aug 2020 19:41:17 +0200 Subject: [PATCH] I HATE CHROME. Chrome doesn't support more than 4 keybindings per extension nor keybindings including the Alt key. The reasons are hysterically unknown. Since I'm not going to drop features for Firefox users just because Google developers decided to make life impossible for web extensions developers, I'm going to keep two different manifest files for Firefox and Chrome - and advise users NOT to use Chrome. --- src/manifest-chrome.json | 60 ++++++++++++++++++++++++ src/manifest-firefox.json | 96 ++++++++++++++++++++++++++++++++++++++ src/manifest.json | 97 +-------------------------------------- 3 files changed, 157 insertions(+), 96 deletions(-) create mode 100644 src/manifest-chrome.json create mode 100644 src/manifest-firefox.json mode change 100644 => 120000 src/manifest.json diff --git a/src/manifest-chrome.json b/src/manifest-chrome.json new file mode 100644 index 0000000..bb9685d --- /dev/null +++ b/src/manifest-chrome.json @@ -0,0 +1,60 @@ +{ + "name": "platypush", + "description": "Web extension for interacting with Platypush instances via browser and creating custom browser actions", + "version": "0.1.8", + "manifest_version": 2, + "icons": { + "16": "icons/icon-16.png", + "32": "icons/icon-32.png", + "48": "icons/icon-48.png", + "64": "icons/icon-64.png", + "128": "icons/icon-128.png", + "256": "icons/icon-256.png" + }, + "permissions": ["activeTab", "storage", "notifications", "clipboardRead", "clipboardWrite", "contextMenus", ""], + + "browser_action": { + "default_title": "platypush", + "default_popup": "popup/popup.html" + }, + + "background": { + "scripts": ["background.js"] + }, + "options_ui": { + "page": "options/options.html", + "chrome_style": true + }, + "content_scripts": [ + { + "matches": ["*://*/*"], + "js": ["content.js"] + } + ], + "commands": { + "user-command-1": { + "suggested_key": { + "default": "Ctrl+Shift+1" + }, + "description": "User command 1" + }, + "user-command-2": { + "suggested_key": { + "default": "Ctrl+Shift+2" + }, + "description": "User command 2" + }, + "user-command-3": { + "suggested_key": { + "default": "Ctrl+Shift+3" + }, + "description": "User command 3" + }, + "user-command-4": { + "suggested_key": { + "default": "Ctrl+Shift+4" + }, + "description": "User command 4" + } + } +} diff --git a/src/manifest-firefox.json b/src/manifest-firefox.json new file mode 100644 index 0000000..64950a3 --- /dev/null +++ b/src/manifest-firefox.json @@ -0,0 +1,96 @@ +{ + "name": "platypush", + "description": "Web extension for interacting with Platypush instances via browser and creating custom browser actions", + "version": "0.1.8", + "manifest_version": 2, + "icons": { + "16": "icons/icon-16.png", + "32": "icons/icon-32.png", + "48": "icons/icon-48.png", + "64": "icons/icon-64.png", + "128": "icons/icon-128.png", + "256": "icons/icon-256.png" + }, + "permissions": ["activeTab", "storage", "notifications", "clipboardRead", "clipboardWrite", "contextMenus", ""], + + "browser_action": { + "default_title": "platypush", + "default_popup": "popup/popup.html" + }, + + "background": { + "scripts": ["background.js"] + }, + "options_ui": { + "page": "options/options.html", + "chrome_style": true + }, + "content_scripts": [ + { + "matches": ["*://*/*"], + "js": ["content.js"] + } + ], + "commands": { + "user-command-0": { + "suggested_key": { + "default": "Ctrl+Alt+0" + }, + "description": "User command 0" + }, + "user-command-1": { + "suggested_key": { + "default": "Ctrl+Alt+1" + }, + "description": "User command 1" + }, + "user-command-2": { + "suggested_key": { + "default": "Ctrl+Alt+2" + }, + "description": "User command 2" + }, + "user-command-3": { + "suggested_key": { + "default": "Ctrl+Alt+3" + }, + "description": "User command 3" + }, + "user-command-4": { + "suggested_key": { + "default": "Ctrl+Alt+4" + }, + "description": "User command 4" + }, + "user-command-5": { + "suggested_key": { + "default": "Ctrl+Alt+5" + }, + "description": "User command 5" + }, + "user-command-6": { + "suggested_key": { + "default": "Ctrl+Alt+6" + }, + "description": "User command 6" + }, + "user-command-7": { + "suggested_key": { + "default": "Ctrl+Alt+7" + }, + "description": "User command 7" + }, + "user-command-8": { + "suggested_key": { + "default": "Ctrl+Alt+8" + }, + "description": "User command 8" + }, + "user-command-9": { + "suggested_key": { + "default": "Ctrl+Alt+9" + }, + "description": "User command 9" + } + } +} diff --git a/src/manifest.json b/src/manifest.json deleted file mode 100644 index 64950a3..0000000 --- a/src/manifest.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "platypush", - "description": "Web extension for interacting with Platypush instances via browser and creating custom browser actions", - "version": "0.1.8", - "manifest_version": 2, - "icons": { - "16": "icons/icon-16.png", - "32": "icons/icon-32.png", - "48": "icons/icon-48.png", - "64": "icons/icon-64.png", - "128": "icons/icon-128.png", - "256": "icons/icon-256.png" - }, - "permissions": ["activeTab", "storage", "notifications", "clipboardRead", "clipboardWrite", "contextMenus", ""], - - "browser_action": { - "default_title": "platypush", - "default_popup": "popup/popup.html" - }, - - "background": { - "scripts": ["background.js"] - }, - "options_ui": { - "page": "options/options.html", - "chrome_style": true - }, - "content_scripts": [ - { - "matches": ["*://*/*"], - "js": ["content.js"] - } - ], - "commands": { - "user-command-0": { - "suggested_key": { - "default": "Ctrl+Alt+0" - }, - "description": "User command 0" - }, - "user-command-1": { - "suggested_key": { - "default": "Ctrl+Alt+1" - }, - "description": "User command 1" - }, - "user-command-2": { - "suggested_key": { - "default": "Ctrl+Alt+2" - }, - "description": "User command 2" - }, - "user-command-3": { - "suggested_key": { - "default": "Ctrl+Alt+3" - }, - "description": "User command 3" - }, - "user-command-4": { - "suggested_key": { - "default": "Ctrl+Alt+4" - }, - "description": "User command 4" - }, - "user-command-5": { - "suggested_key": { - "default": "Ctrl+Alt+5" - }, - "description": "User command 5" - }, - "user-command-6": { - "suggested_key": { - "default": "Ctrl+Alt+6" - }, - "description": "User command 6" - }, - "user-command-7": { - "suggested_key": { - "default": "Ctrl+Alt+7" - }, - "description": "User command 7" - }, - "user-command-8": { - "suggested_key": { - "default": "Ctrl+Alt+8" - }, - "description": "User command 8" - }, - "user-command-9": { - "suggested_key": { - "default": "Ctrl+Alt+9" - }, - "description": "User command 9" - } - } -} diff --git a/src/manifest.json b/src/manifest.json new file mode 120000 index 0000000..bcd3b50 --- /dev/null +++ b/src/manifest.json @@ -0,0 +1 @@ +manifest-chrome.json \ No newline at end of file