Open cmeinco opened 3 years ago
Using /addlink
to load the create link prompt will be strait-forward, i'll add this in an upcoming release
Requesting the link and pulling title automatically is possible as well (and something I have the v1 code to do) - but it gets complicated. If the browser is sending the requests will run into CORS issues, if the server is sending the request then run into Proxy issues and possibly CSRF or the like. Would have to expand the threat model to eval it.
Lets say the request is successful, to pull the title isn't always straitforward, the <title>
tag can be parsed, but many sites also set titles via javascript, which would mean having to load and run the site in some sort of sandbox, which adds host dependencies to notedo which i'm not a big fan of (such as chrome cli must be installed and on the PATH). Perhaps the creation of the link will trigger a simple GET from the notedo process, no cookies, headers, or proxy support. And obtaining the title is purely based on the title
tag existing in the first X bytes of the response. If not then title not found
yeah i like the notedo server pulling that content, much like those "chat apps" which pull in previews of content when links are posted. :) prob could be hooked into the "polling" process to detect when links are broken; similar threats i think.
Summary quick way to add a new link
Intended Outcome make adding a link from any context easier
How will it work? /addlink and then load prompt to type in page; or maybe request it and pull the title automatically