zadam / trilium-web-clipper

Save web clippings to Trilium Notes.
GNU General Public License v3.0
258 stars 53 forks source link

Check if the current page is already saved in trilium #54

Closed manto89 closed 1 year ago

manto89 commented 1 year ago

Related to #53
I had to add an event listener that, after the web-clipper finds trilium (server or desktop application), will search if trilium has a note (under Inbox or clipperInbox ) with a pageUrl tag that is the same as the current page url. If the note is found an event is sent that will change the content of the <div id="already-visited"></div> inside popup.html, otherwise the div is kept empty. This PR will work only after zadam/trilium#4075 is merged, since that PR exposes the endpoint to search a note by url