Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Provide a button for batch import browser bookmark URLs #23

Open
littlemoji opened this issue Apr 18, 2024 · 4 comments
Open

Comments

@littlemoji
Copy link

littlemoji commented Apr 18, 2024

Provide a button for batch import browser bookmark URLs
Chrome browser(almost all mainstream browsers ) bookmarks are exported as an HTML file, so i think we can get the URLs by reading all the href attributes of <a> tag.

@Dhravya
Copy link
Owner

Dhravya commented Apr 18, 2024

Amazing idea. it's planned! Anyone wanna work on this one?

@littlemoji
Copy link
Author

is chrome.runtime.sendMessage({ type: "urlChange", content, url, spaces }); this function send data to api ?
Since browser bookmarks may only provide URLs, what do type, content, and spaces signify?

@littlemoji
Copy link
Author

If the outcomes of the Q&A are based on the content from the method mentioned above, and given that the pages linked by the URLs might change, should users be allowed to set how frequently the content from these links is updated?

@Dhravya
Copy link
Owner

Dhravya commented Apr 19, 2024

Hi!
Yes, chrome.runtime.sendMessage({ type: "urlChange", content, url, spaces }) is the function that sends data to the API.
Naming is weird because earlier it used to be something else! haha
We'll need one more function to send the URL only (And then render a browser to get the contents using browser rendering maybe)

what do type, content, and spaces signify?

In chrome extensions, the client and 'background script' (that can send requests to the API and store sensitive information like user credentials) communicate using something called "messages"
messages are distinguished by 'types'. in the background script, there's a message listener and an if-else statement that basically filters the type to run a specific piece of code with some information (content and spaces)
hope that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants