mirror of
https://github.com/lil-org/tokenary.git
synced 2024-11-26 04:04:20 +03:00
switch back to manifest v2
This commit is contained in:
parent
925be95237
commit
f0b69c8b4f
@ -151,13 +151,7 @@ function mobileRedirectFor(request, sendResponse) {
|
||||
const query = encodeURIComponent(JSON.stringify(request));
|
||||
browser.tabs.getCurrent((tab) => {
|
||||
if (tab) {
|
||||
browser.scripting.executeScript({
|
||||
target: { tabId: tab.id },
|
||||
func: (query) => {
|
||||
window.location.href = `https://tokenary.io/extension?query=${query}`;
|
||||
},
|
||||
args: [query]
|
||||
}).then(() => {}).catch(() => {});
|
||||
browser.tabs.executeScript(tab.id, { code: 'window.location.href = `https://tokenary.io/extension?query=' + query + '`;' });
|
||||
sendResponse();
|
||||
}
|
||||
});
|
||||
@ -171,7 +165,7 @@ function genId() {
|
||||
|
||||
function addListeners() {
|
||||
browser.runtime.onMessage.addListener(handleOnMessage);
|
||||
browser.action.onClicked.addListener(handleOnClick);
|
||||
browser.browserAction.onClicked.addListener(handleOnClick);
|
||||
}
|
||||
|
||||
addListeners();
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"manifest_version": 2,
|
||||
"default_locale": "en",
|
||||
|
||||
"name": "__MSG_extension_name__",
|
||||
@ -15,7 +15,8 @@
|
||||
},
|
||||
|
||||
"background": {
|
||||
"service_worker": "service_worker.js"
|
||||
"scripts": [ "service_worker.js" ],
|
||||
"persistent": false
|
||||
},
|
||||
|
||||
"content_scripts": [{
|
||||
@ -25,7 +26,7 @@
|
||||
"js": [ "ios_specific_content.js", "content.js" ]
|
||||
}],
|
||||
|
||||
"action": {
|
||||
"browser_action": {
|
||||
"default_icon": {
|
||||
"16": "images/toolbar-icon-16.png",
|
||||
"19": "images/toolbar-icon-19.png",
|
||||
@ -35,7 +36,6 @@
|
||||
},
|
||||
|
||||
"permissions": [
|
||||
"scripting",
|
||||
"nativeMessaging",
|
||||
"storage",
|
||||
"activeTab",
|
||||
@ -49,8 +49,5 @@
|
||||
"tokenary://*"
|
||||
],
|
||||
|
||||
"web_accessible_resources": [{
|
||||
"resources": [ "inpage.js" ],
|
||||
"matches": ["<all_urls>"]
|
||||
}]
|
||||
"web_accessible_resources": [ "inpage.js" ]
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"manifest_version": 2,
|
||||
"default_locale": "en",
|
||||
|
||||
"name": "__MSG_extension_name__",
|
||||
@ -15,7 +15,8 @@
|
||||
},
|
||||
|
||||
"background": {
|
||||
"service_worker": "service_worker.js"
|
||||
"scripts": [ "service_worker.js" ],
|
||||
"persistent": false
|
||||
},
|
||||
|
||||
"content_scripts": [{
|
||||
@ -25,7 +26,7 @@
|
||||
"js": [ "macos_specific_content.js", "content.js" ]
|
||||
}],
|
||||
|
||||
"action": {
|
||||
"browser_action": {
|
||||
"default_icon": {
|
||||
"16": "images/toolbar-icon-16.png",
|
||||
"19": "images/toolbar-icon-19.png",
|
||||
@ -37,7 +38,8 @@
|
||||
"permissions": [
|
||||
"nativeMessaging",
|
||||
"storage",
|
||||
"activeTab"
|
||||
"activeTab",
|
||||
"tabs"
|
||||
],
|
||||
|
||||
"host_permissions": [
|
||||
@ -46,8 +48,5 @@
|
||||
"https://tokenary.io/*"
|
||||
],
|
||||
|
||||
"web_accessible_resources": [{
|
||||
"resources": [ "inpage.js" ],
|
||||
"matches": ["<all_urls>"]
|
||||
}]
|
||||
"web_accessible_resources": [ "inpage.js" ]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user