There are plenty of projects I'm familiar with but don't know the canonical URL off the top of my head - when I link someone else to them I have to look up their homepage. This would make this process much faster.
There are plenty of projects I'm familiar with but don't know the canonical URL off the top of my head - when I link someone else to them I have to look up their homepage. This would make this process much faster.
The entire function is basically this (requires Tridactyl native messenger).
command cp js -p tri.native.run('cd ~ && ddgr --json -n 1 ' +JS_ARG + '| jq -r ".[0].url" | xclip -sel clip')
[1] https://github.com/tridactyl/tridactyl[2] https://github.com/jarun/ddgr
[3] https://stedolan.github.io/jq/
PS: I used this tool itself to find the links for the three projects mentioned above.
In this case, we have Firefox, which has built-in integration for DDG, as well as lots and lots of capability for querying and processing JSON. And on top of that, we are adding a command that drops to the command line to make a series of command calls to different programs for sending and extracting a search query. All to return 1 URL. It's nuts.
This topic could be a 20-page thesis.
Is it possible to do this using the HTML5 clipboard functions instead?
Tridactyl provides a `:shellescape` function for sanitising untrusted input but I don't think it is needed in this case.
> Conditions of having this behavior enabled vary from one browser to another, and have evolved over time.
If you're not running based on a click event, you'll certainly fail.
My motivation was using Google "I'm Feeling Lucky" without JS. The node app detects the "!lucky" bang, downloads the search results, finds the first link, and redirects to it.
Let me know if it interests you.
There's plenty of hypocrisy at that company but this doesn't strike me as a case of it.
I'd suggest respecting Google's robots.txt as much as Google respects our DNT settings.
Why? I'm seriously curious about cases in which any of these can be useful.