From ab5821a062eb46f373b77d8a708b69f34b18fce6 Mon Sep 17 00:00:00 2001 From: Kagura Date: Mon, 4 Nov 2024 13:06:29 +0800 Subject: [PATCH] fix: openb --- src/main/kotlin/utils/OpenBrowser.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/kotlin/utils/OpenBrowser.kt b/src/main/kotlin/utils/OpenBrowser.kt index 1dd164f..5f1af6e 100644 --- a/src/main/kotlin/utils/OpenBrowser.kt +++ b/src/main/kotlin/utils/OpenBrowser.kt @@ -26,6 +26,11 @@ private fun openBrowser(uri: URI) { val content = StringSelection(uri.toString()) clipboard.setContents(content, null) } + } catch (_ : Exception){ + val clipboard = Toolkit.getDefaultToolkit().systemClipboard + val content = StringSelection(uri.toString()) + clipboard.setContents(content, null) + } }