simple-alternative

browser extension to detect simple language alternatives
git clone https://git.ce9e.org/simple-alternative.git

commit
ef8b4a9c2d913c10422e19994fa20a2a3be4048f
parent
7b82de1da396c1f53a4e53670354101b782c42f2
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-01-02 13:12
switch to browser action

Diffstat

M bg.js 5 +++--
M manifest.json 2 +-

2 files changed, 4 insertions, 3 deletions


diff --git a/bg.js b/bg.js

@@ -1,13 +1,14 @@
    1     1 (function() {
    2     2 	"use strict";
   -1     3 	chrome.browserAction.disable();
    3     4 
    4     5 	chrome.runtime.onMessage.addListener(function(request, sender) {
    5     6 		if (request === 'showPageAction' && sender) {
    6    -1 			chrome.pageAction.show(sender.tab.id);
   -1     7 			chrome.browserAction.enable(sender.tab.id);
    7     8 		}
    8     9 	});
    9    10 
   10    -1 	chrome.pageAction.onClicked.addListener(function(tab) {
   -1    11 	chrome.browserAction.onClicked.addListener(function(tab) {
   11    12 		chrome.tabs.sendMessage(tab.id, 'simplify');
   12    13 	});
   13    14 })();

diff --git a/manifest.json b/manifest.json

@@ -21,7 +21,7 @@
   21    21     "run_at": "document_idle"
   22    22   }],
   23    23 
   24    -1   "page_action": {
   -1    24   "browser_action": {
   25    25     "default_icon": {
   26    26       "32": "icons/icon-32.png",
   27    27       "128": "icons/icon-128.png"