aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <nea@nea.moe>2023-04-27 15:38:26 +0200
committerGitHub <noreply@github.com>2023-04-27 15:38:26 +0200
commit87b6d9b184168b8558a574799cfa34efc04d5f06 (patch)
tree42de0aaa7626d505bd365a089dc82085e3725233 /src/main/java/at
parent0d74c351c556c9d86b26d5d024b715a838f804e5 (diff)
downloadskyhanni-87b6d9b184168b8558a574799cfa34efc04d5f06.tar.gz
skyhanni-87b6d9b184168b8558a574799cfa34efc04d5f06.tar.bz2
skyhanni-87b6d9b184168b8558a574799cfa34efc04d5f06.zip
Copy url to clipboard on failed browse (#66)
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt
index 050937022..5aa6915bd 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt
@@ -19,10 +19,11 @@ object OSUtils {
Desktop.getDesktop().browse(URI(url))
} catch (e: IOException) {
e.printStackTrace()
- LorenzUtils.error("[SkyHanni] Error opening website!")
+ LorenzUtils.error("[SkyHanni] Error opening website: $url!")
}
} else {
- LorenzUtils.warning("[SkyHanni] Web browser is not supported!")
+ copyToClipboard(url)
+ LorenzUtils.warning("[SkyHanni] Web browser is not supported! Copied url to clipboard.")
}
}
@@ -52,4 +53,4 @@ object OSUtils {
if (this.isKeyDown || this.isPressed) return true
return false
}
-} \ No newline at end of file
+}