This PR adds a new function syncBookmarks() to the extension/script.js file. The function sends a GET request to the /bookmarks endpoint and handles the returned JSON data to add or remove bookmarks as needed.
Summary of Changes
Added syncBookmarks() function to extension/script.js.
The function sends a GET request to the /bookmarks endpoint using the fetch function.
The returned response is converted to JSON using the json() method.
Iterates over the returned bookmarks and adds them if they don't exist in the local bookmarks.
Iterates over the local bookmarks and removes them if they don't exist in the returned bookmarks.
Please review and merge this PR. Thank you!
Fixes #25.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/sync-bookmarks
🎉 Latest improvements to Sweep:
Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
We released a demo of our chunker, where you can find the corresponding blog and code.
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds a new function
syncBookmarks()
to theextension/script.js
file. The function sends a GET request to the/bookmarks
endpoint and handles the returned JSON data to add or remove bookmarks as needed.Summary of Changes
syncBookmarks()
function toextension/script.js
./bookmarks
endpoint using thefetch
function.json()
method.Please review and merge this PR. Thank you!
Fixes #25.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: