Fix Storage Sync Checkbox Initialization on Page Load #353
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request addresses a small issue with the initialization of the storage sync checkbox in the
redirectorpage.js
file. Previously, the checkbox would always appear unchecked upon page load, regardless of the actual sync status. With this fix, the checkbox now properly reflects the sync status on page load.Changes
The primary change made in this pull request is to correctly set the
checked
property of the input element for the storage sync checkbox during the initial load. The modified code snippet is as follows:The issue was caused by setting the
checked
property on thelabel
element instead of theinput
element. The updated code selects the correctinput
element and sets itschecked
property based on theisSyncEnabled
value.Impact
This change ensures a better user experience, as the storage sync checkbox will now correctly display its status upon loading the page. This helps users understand the current sync setting and reduces confusion when using the extension.
Testing
To verify the changes, follow these steps:
Please let me know if you have any questions or need any further clarification. I'm looking forward to hearing your thoughts on this fix, and I hope it improves the extension's user experience!