Firefox extension that redirects to a random wikipedia page when you open a new tab, because when you're opening a new tab you're looking for a distraction and that distraction might as well be a weird fact
-
install npm
-
install web-ext:
npm install --global web-ext -
run in project folder:
web-ext run -
navigate to
about:addonsin the firefox window that opens. click extensions. it's installed :D extension will auto update as you save files in the project. -
navigate to
about:debugging, make sureEnable add-on debuggingis checked, and clickdebugnext to the extension name. that's how you debug the extension.
oh geez firefox extension development is a wasteland ):
cool stuff I found while trying to do the least work possible to scrape wikipedia pages:
- wiki api supports parsing :D
- wiki api sandbox! which I used to navigate the cumbersome wiki api
- nice
other notes
web-ext runwill watch for changes and reload. if you're working on extension options_ui page it kills it. if that's the only tab open it will kill the browser and end theweb-ext runprocess. not sure the best workflow to deal with this but I've hadabout:addonsopened in the other tab to easily open up the extension ui after it closes while refreshing
- escape custom wiki page chars
- tests
- icons
- filter wiki links by ns
- load more than 500 links
