|
| 1 | +#  Discourse HTML |
| 2 | + |
| 3 | +A super simple [Browser Extension][] for redirecting [Discourse][] community |
| 4 | +websites to their HTML versions, rather than their [js;dr][] defaults. |
| 5 | + |
| 6 | +1. Automatically [append `?_escaped_fragment_`][] to any known Discourse URL. |
| 7 | + |
| 8 | +2. Offer an options page for the user to configure Discourse URLs. |
| 9 | + |
| 10 | +## Differences from spec |
| 11 | + |
| 12 | +The extension was created with [the Browser Extensions specification][spec] in |
| 13 | +mind. It turns out this is very hard to do while also supporting real |
| 14 | +life browsers. |
| 15 | + |
| 16 | +* This extension uses the [`options_ui` manifest key][] instead of the |
| 17 | + [`options_page` manifest key][] from the spec. |
| 18 | +* This extension asks for the non-standard `storage` permission to use the [Web |
| 19 | + Storage API][]. |
| 20 | + |
| 21 | +Any other differences should be reported and either documented here or fixed |
| 22 | +as bugs. |
| 23 | + |
| 24 | +## Code Style |
| 25 | + |
| 26 | +This extension follows the [JavaScript Standard Style][]. I apologise if you |
| 27 | +love semicolons. Make sure to run it under the WebExtensions environment: |
| 28 | + |
| 29 | +``` |
| 30 | +standard --env webextensions |
| 31 | +``` |
| 32 | + |
| 33 | +## Licenses |
| 34 | + |
| 35 | +* The official logo [`discourse.png`][] is “®, Civilized Discourse Construction |
| 36 | + Kit, Inc.” and was used as a base for this extension’s logo. |
| 37 | + |
| 38 | +* Everything else is released under the BSD Zero Clause License (0BSD). |
| 39 | + Please see the [`LICENSE`](LICENSE) file for more information. |
| 40 | + |
| 41 | +[Browser Extension]: https://browserext.github.io/ |
| 42 | +[Discourse]: https://www.discourse.org/ |
| 43 | +[js;dr]: https://indieweb.org/js;dr |
| 44 | +[append `?_escaped_fragment_`]: https://news.ycombinator.com/item?id=14247848 |
| 45 | +[pull requests]: https://help.github.com/articles/creating-a-pull-request/ |
| 46 | +[spec]: https://browserext.github.io/browserext/ |
| 47 | +[`options_ui` manifest key]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/options_ui |
| 48 | +[`options_page` manifest key]: https://browserext.github.io/browserext/#list-of-keys |
| 49 | +[Web Storage API]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/storage |
| 50 | +[JavaScript Standard Style]: https://standardjs.com/ |
| 51 | +[`discourse.png`]: https://github.com/discourse/discourse/blob/96b46170941f9ef8f492a993b0fbcbf591a1e9ae/images/discourse.png |
0 commit comments