Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to WebExtensions (Firefox)? #4

Open
yoasif opened this issue Nov 26, 2017 · 2 comments
Open

Port to WebExtensions (Firefox)? #4

yoasif opened this issue Nov 26, 2017 · 2 comments

Comments

@yoasif
Copy link

yoasif commented Nov 26, 2017

It should be (hopefully) fairly easy to port - https://developer.mozilla.org/en-US/Add-ons/WebExtensions

You know you have users that want this, they'll be pleased for a port!

@andreicristianpetcu
Copy link

andreicristianpetcu commented Dec 31, 2017

I tried a port.... but it uses a deprecated Chrome API and Firefox does not implement deprecated chrome APIs. It uses this https://developer.mozilla.org/ro/Add-ons/WebExtensions/API/extension/sendRequest instead of this https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/sendMessage

This is just the first issue I bumped into. I don't know this extension, I am not a user.... I just help out people who want to switch from Chrome to Firefox.

https://twitter.com/metonymyqt/status/947185482835906565

@andreicristianpetcu
Copy link

I basically did this https://vimeo.com/241435808 this is the list of APIs Firefox supports https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs

I also changed the manifest.json to this:

{
   "background": {
      "scripts": [ "data.js", "cperapera.js", "background.js" ]
   },
   "browser_action": {
      "default_icon": "images/toolbar-disabled.png",
      "default_title": "Perapera Chinese Popup Dictionary"
   },
   "content_scripts": [ {
      "all_frames": true,
      "js": [ "cperacontent.js" ],
      "matches": [ "\u003Call_urls>" ]
   } ],
   "description": "Put your mouse over any Chinese words on a webpage and it gives you the pronunciation and definition. Simple as that!",
   "icons": {
      "128": "images/icon128.png",
      "16": "images/icon16.png",
      "48": "images/icon48.png"
   },
   "manifest_version": 2,
   "name": "Perapera Chinese Popup Dictionary",
   "options_ui": {
    "page": "options.html"
   },
   "permissions": [ "tabs", "http://*/*" ],
   "version": "1.1.0",
   "web_accessible_resources": [ "css/*", "cperacontent.js", "images/*" ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants