FlightGear wiki:Howto: Wiki addon development
|This article is a stub. You can help the wiki by|
Come up with a single unified browser addon (web-extension) to help with editing the Flightgear wiki and work around some of its limitations.
This step also cause a number of regressions, because we are no longer using certain dependencies, e.g. jQuery. Also, the conceptual split into so called content scripts and background scripts made it necessary to move certain functionality out of the original userscript.
We're now exploring if it makes sense to integrate both "scripts" to grow a library of useful tools and APIs to help edit/maintain the FlightGear wiki.
|Note Strictly speaking, web-ext/npm isn't really required currently - i.e. you can just as well test the addon by installing it temporarily via the |
For the sake of simplicity, it's recommended to have the following tools installed:
- git (version control)
- npm (package manager, used to install web-ext)
- web-ext (tool used to actually develop/test web extensions)
Testing the extension
|Note When using web-ext to test the extension, this will set up a new firefox profile, so that features using persistent settings, won't work as expected|
- download the ZIP file: https://ufile.io/kwrbm
- extract it to a new directory, change to that dir
web-ext runinside the new directory
- in firefox, go to a supported forum/mailing list URL
- make a selection using the mouse
- to configure the addon, go to
about:addonsand navigate to the "Preferences" button next to the extension's entry.
- to install the dependencies of the headless script (node.js), run
npm installinside the extension folder
List of dependencies that we may want to evaluate:
- https://www.npmjs.com/package/wikijs (>2k downloads/month)
- https://www.npmjs.com/package/nodemw (~700 downloads/month)
- https://www.npmjs.com/package/mwbot (~300 downloads/month)
- restore mediawiki access using a wrapper to encapsulate https://www.npmjs.com/package/mediawiki
- restore storage support
- restore UI/wizard support