Comments (14)
Which add-on in particular? All/any of them? Which add-ons have you tried?
Are their steps not listed in the readme that are required? eg. Some firefox flags or something?
I don't think so.
You should not need to copy any files: just clone or download the repo, and follow the instructions here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Packaging_and_installation#Loading_from_disk to install a particular add-on into Firefox.
When you do that, does the add-on appear in about:debugging, in the list of installed add-ons, like this: https://i.imgur.com/KODdmEu.png?
from webextensions-examples.
Apologies thought this was a repo for a specific demo.
This one: https://github.com/mdn/webextensions-examples/tree/master/context-menu-demo
Because I didn't want to checkout all the examples (just testing context menu options at the moment), I just copied the files, messages and icons.
I'm loading it in debugging mode, and the context menu options show up (see here: https://i.imgur.com/gBQtApx.jpg), but clicking them does nothing, and the Browser Console does not communicate any errors.
from webextensions-examples.
Oh yeah, sorry. You need Firefox 48 for context menus to work properly. Please try with that (the current Beta, or you could use Developer Edition also) and let me know if it works any better.
from webextensions-examples.
Gotcha okay. I have Firefox 47 and it's not auto-updating, which means most users probably don't have Firefox 48 either. Is there any expected timeline on when Mozilla will be pushing out Firefox 48 as the default browser?
from webextensions-examples.
Yes! Firefox 48 will ship on August 2, according to this rather confusing table: https://wiki.mozilla.org/RapidRelease/Calendar. That's also the "first stable release" of WebExtension support: https://wiki.mozilla.org/WebExtensions/RoadMap#Firefox_48.
from webextensions-examples.
Thanks @wbamberg
I'll test things out locally in Firefox 48 dev build.
What will happen if the min version is set as 48, and someone attempts to install the extension?
from webextensions-examples.
What will happen if the min version is set as 48, and someone attempts to install the extension?
Ha, good question. As far as I know:
- if you try to install a properly packaged-for-distribution add-on in Firefox 47, and its min version is 48, then installation will fail and you will see an error in the console
- if you try to install the same add-on using "Load Temporary Add-on", then Firefox 47 will happily install it (and it will not work, of course).
We discussed this over in bug 1192437 but the discussion kind of petered out. I just filed bug 1281884 for this issue. Thanks for reminding me!
I've also just updated the strict_min_version for this example, and also updated the compat data for contextMenus. I think that's the best we can do here, so I'll close this issue. But let me know if you see anything else that needs attention.
from webextensions-examples.
So are you saying that even though strict_min_version
will be set to 48.0
, someone using 47.0 will be able to install it? My assumption would be that Firefox would communicate to the user that a minimum version is required.
If that's not the case, would you recommend sniffing the user agent for a version and then communicating to the user within the app itself? I'm reluctant to base logic like that off a user agent :(
from webextensions-examples.
So are you saying that even though strict_min_version will be set to 48.0,
someone using 47.0 will be able to install it?
Not exactly. There are 2 ways to install a WebExtension in Firefox:
- the "Load Temporary Add-on" way described here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Packaging_and_installation#Loading_from_disk. This is most likely what the developer will use while they're working on the add-on. If you're used to Chrome extensions, this is like the "Load unpacked extension" thing in chrome://extensions.
- opening a packaged "XPI" file in Firefox. Once you've finished writing an add-on, you submit it to Mozilla for signing, and can choose also to host it on Mozilla's website. Mozilla will review it, sign it, create the signed XPI. Users will then visit Mozilla's website (or your website, if you want to distribute it yourself) to download and install the XPI. So this is the way your users will install an add-on. This is the equivalent of Chrome CRX files.
So:
- The "strict_min_version" key will be properly respected by Firefox if the add-on is installed using method 2: meaning that Fx47 will refuse to install an add-on with strict_min_version==48.0, and will report an error.
- Unless & until bug 1281884 is fixed, then the "strict_min_version" will not be respected if the add-on is installed using method 1.
Meaning that this problem will not affect your users, it's just a bit annoying for developers.
So no, I wouldn't recommend doing UA sniffing here :).
from webextensions-examples.
Gotcha, yah I'm not worried about developers. More, if an end user installs it via a signed version, but they don't realize they have the wrong version, having it error out in their console won't help much: they'll just think the extension is broken.
Does Mozilla communicate to them they need to upgrade their Firefox?
from webextensions-examples.
Oh, I was wrong about that, it is visible to users. It looks like this: https://i.imgur.com/nFySbzU.png
from webextensions-examples.
Awesome thanks @wbamberg
I feel like it makes a bit more sense to communicate to the user that the reason it's not compatible is because the user hasn't yet upgraded their Firefox (which at that point is an opp to prompt them with a CTA to do so).
Is there someone I can post / file that suggestion?
from webextensions-examples.
You could file a bug: https://bugzilla.mozilla.org/enter_bug.cgi?product=Toolkit&component=Add-ons%20Manager. Offhand, it does seem to me like a good idea, but I'm not really qualified to judge.
from webextensions-examples.
Great thanks for your help!
from webextensions-examples.
Related Issues (20)
- Favourite Color bug manifest HOT 11
- Native messaging example doesn't pong after a while HOT 3
- browser is not defined in firefox HOT 3
- Can't get response in Ubuntu HOT 10
- Python Native Messaging host does not process 1MB input HOT 11
- Image is not loading by innerHTML in the content-script-register HOT 3
- Create an example of getting select text to a variable HOT 2
- Please add example for "Paste text from clipboard" HOT 5
- examples.json should include a way to list significant manifest keys
- Update eslint, fix linting errors and integrate in CI
- MV3 example for getting data from page/content script/activeTab context into action / popup HOT 3
- Broken root-cert-stats due to var -> let change HOT 6
- Firefox Load temporary addon not working HOT 12
- native-messaging app example: provide non-contrived example for each platform HOT 1
- Update root-cert-stats to use runtime.sendMessage HOT 3
- zip does not contain a valid manifest HOT 2
- Examples disabled when run via web-ext or from folder (applyCSS, borderify) HOT 9
- minor bug with native messaging example HOT 2
- native messaging example: port disconnects without an error HOT 14
- devtools-panels example broken with manifest v3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webextensions-examples.