vasanthv / webtag

A free & open source online bookmarking tool
https://webtag.io
MIT License
128 stars 4 forks source link

Modify bookmarklet to pass the Title of the page as well? #10

Closed nick-s-b closed 5 months ago

nick-s-b commented 5 months ago

Hi,

I started using webtag daily to organize my bookmarks and while I have some issues, it's the best solution I've found so far. I've noticed that when you add a link, the Title cannot be added/edited on the New Bookmark/Add Bookmark page. webtag actually fetches the page and grabs the title this way. Unfortunately, this method has issues:

  1. It cannot fetch titles of password protected pages
  2. It cannot fetch titles of pages that are protected with Cloudflare and other captchas
  3. If you've use a translation feature to translate a page and its title, it will add original title.

It think all of these issues could be mitigated by allowing bookmark to pass the title of page along with the URL. Something like:

https://webtag.io/bookmark?"+encodeURIComponent(document.location)+"&t="+encodeURIComponent(document.title)

This would also eliminate the need for webtag to fetch the whole page to grab the title. Thoughts?

vasanthv commented 5 months ago

Thanks for the suggestion. Webtag did not have title as a field as it adds a friction while creating a bookmark. It should be as easy as copy pasting a URL. But, your proposal was really good, as we can by pass fetching the title, by getting from bookmarklet. I have made a commit with the requested change.

6e01023893acb8e41b172831c1bfac3f679b8af3

vasanthv commented 5 months ago

You might want to update your bookmarklet with the new one.