Use "Web Shortcuts" to open a selected URL?

Sefa Eyeoglu contact at scrumplex.net
Tue Sep 15 11:16:00 BST 2020


On Tuesday 15 September 2020 11:51:11 CEST René J.V. Bertin wrote:
> Hi,
> 
> I guess we're all familiar with documents (say, emails) containing links to
> websites that are not "clickable", so you have to copy and then paste them
> into your browser.
> 
> I've tried to come up with something to use the Web Shortcuts feature to
> open them with just 2 clicks, but failed until now. The feature really
> seems to be designed to open the selected text in a search engine.
> 
> I guess that what you'd need is an existing simple web proxy that takes an
> encoded URL and then sends you there, so you could create a shortcut to
> something like `https://go.to/\{@}`. I haven't found one yet (hard to come
> up with a selective search key!). Alternatively, if the feature supports
> local file URLs and those support arguments, you could replace the
> `https://go.to/` part with a `file://path/to/goto.html/` file.
> 
> I have about zero experience doing web/html/JS coding but maybe someone 
here
> can tell me if this is possible and give me some pointers?
> 
> Thanks,
> R.

Hi there,


I just played around with it a bit and came up with this:


I have a simple HTML file located locally on my computer and use JavaScript to 
correctly parse the URL.


My shortcut URL is


    file:///home/scrumplex/redirect.html#\{0}


I am using {0} here so you can also preserve the parameters of an URL (?
foo=bar&bar=foo).


That file's content is here: https://gitlab.com/-/snippets/2015231 


-- 
Sefa Eyeoglu
https://scrumplex.net[1] 


--------
[1] https://scrumplex.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde/attachments/20200915/1117e93c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20200915/1117e93c/attachment.sig>


More information about the kde mailing list