stoically / radical

Element (Riot Web) unofficially bundled as Firefox Add-on
https://addons.mozilla.org/firefox/addon/radical-web
MIT License
32 stars 1 forks source link

Add ability to edit the Riot's config.json #10

Closed anoadragon453 closed 4 years ago

anoadragon453 commented 4 years ago

It's nice to be able to edit Riot's config.json file so that you can set a default homeserver, or add/remove feature flags.

Could this be possible, maybe with a textbox in extension settings or something?

stoically commented 4 years ago

I would very much like a way to edit the config.json! Currently Riot Web requests the config.json by issuing an fetch request, so to be able to modify the config.json it would need to either be possible to change the config.json in the Add-on itself or intercept the request and modify its response.

Both isn't possible, unfortunately. Files in the Add-on itself are static and can't be modified, and intercepting requests issued from an extension page isn't possible since the scheme isn't supported.

To support this it would probably require support from Riot Web directly, so it could check whether it runs in a WebExtensions context, and if it does it could e.g. check the storage directly for a config or ask the background by sending a message.

stoically commented 4 years ago

Added rudimentary way to edit the config.json in the Add-on preferences. Released with v1.5.7.8.

anoadragon453 commented 4 years ago

Thanks!