Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer to copy non-HTTP links to the clipboard instead of trying to open them #3388

Merged

Conversation

Simon-Laux
Copy link
Member

No description provided.

@@ -493,8 +493,12 @@ class Electron implements Runtime {
openLink(link: string): void {
if (link.startsWith('mailto:')) {
processOpenQrUrl(link)
} else {
} else if (link.startsWith('http')) {
Copy link
Collaborator

@link2xt link2xt Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather explicitly check for "http://" or "https://" prefix with ||, who knows if some app decides to register httpx scheme.

@Simon-Laux Simon-Laux merged commit 59cd909 into master Sep 7, 2023
6 checks passed
@Simon-Laux Simon-Laux deleted the simon/copy-links-with-custom-schemes-to-clipboard branch September 7, 2023 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants