ParticleCore / Iridium

Iridium is an extension built to improve your YouTube experience
Other
1.32k stars 138 forks source link

Import and export settings #891

Closed ParticleCore closed 10 months ago

ParticleCore commented 11 months ago

Provide ability to import and export settings.

Importing settings will be an additive process, meaning it won't replace the existing settings completely, instead it will replace any setting values that are equal and keep any that are not. This is meant to prevent issues where the backed up settings are from an older version that might not have settings for new features added at a later time, or that might have changed their key name.

ParticleCore commented 11 months ago

Unlike in the previous versions, the feature is simplified to make use of a plain .json file instead of implementing a custom text editor directly, which has its disadvantages and advantages. The code is kept simpler, and the usability of it as well (exports as a file, loads from a file) at the cost of being able to edit the file directly in the options window, but this can easily be solved by using any text editor at hand.

A broadcast id key will now be stored in the settings as well, this is meant to prevent the extension from working properly from the YouTube pages themselves whenever the extension is updated.

To prevent any risks of rogue code in the page from communicating with the extension directly, a specific communication key that validates any communication messages is in place to ensure the messages can be accepted and processed. Although this is unlikely to ever happen, the main goal is the same as it was before when the Firefox extension was first released; convey to the Firefox team that this extension is making sure no rogue code has any access to browser privileged code by accident.