-
-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Currently only http:// https:// and mailto: links are recognized as external links.
It would be nice if other external URIs where recognized specifically:
- ssh: Secure Shell
- tel: Telephone
I've been trying NoteDiscovery for my technical notes and so far I quite like it, however for console access to virtual machines and servers, I use ssh: URI's extensively in proxmox descriptions and would like to be able to use them in my notes. Also my desktop is setup to pass tel: links to my phone system, and my mobile handles tel: links as well.
I'll admit that the ssh: scheme is not commonly used, and there are probably other protocols that someone else would use, so maybe a config setting with a list of prefix's that are considered external besides http://, https://, //, mailto:, and /api/
I tested this and it seems adding tel: to the list works, but adding ssh: doesn't (no longer thinks it a note, but doesn't handle the link at all, maybe it's an upstream issue),
frontent/app.js would need to be modified (~2499)
from:
// Check if it's an external link or API path (media files, etc.)
if (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//') || href.startsWith('mailto:') || href.startsWith('/api/')) {
return; // Let external links and API paths work normally
}to:
// Check if it's an external link or API path (media files, etc.)
if (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//') || href.startsWith('mailto:') || href.startsWith('tel:') || href.startsWith('ssh:') || href.startsWith('/api/')) {
return; // Let external links and API paths work normally
}