rj1
about | log | files | refs | license
commit 8dc2aaa323a98a95ca2e9ef4801188dde6f204d7
parent b43bcaab0e6d5362c59bdd2a7ee9ce4fa68a4637
author: rj1 <[email protected]>
date:   Mon, 19 Sep 2022 05:32:44 -0500

update plugin to be compatible as both a firefox & chrome extension

Diffstat:
Mmanifest.json | 3++-
Mupload.js | 4++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/manifest.json b/manifest.json @@ -5,6 +5,7 @@ "icons": { "200": "icon.png" }, + "description": "This extension allows you to right click an image and upload it to an image sharing website.", "permissions" : [ "contextMenus", "tabs", @@ -18,7 +19,7 @@ { "matches" : ["http://*/*", "https://*/*"], "css" : [], - "js" : [] + "js" : ["upload.js"] } ] } diff --git a/upload.js b/upload.js @@ -1,4 +1,4 @@ -browser.contextMenus.create({ +chrome.contextMenus.create({ title: "Upload image [POST]", contexts: ["image"], onclick: function(info) { @@ -13,7 +13,7 @@ browser.contextMenus.create({ upload.responseType = 'text'; upload.onload = function() { url = upload.response - browser.tabs.create({url: url}); + chrome.tabs.create({url: url}); } // upload image