diff options
author | Roman / Linnea Gräf <nea@nea.moe> | 2023-04-27 15:38:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 15:38:26 +0200 |
commit | 87b6d9b184168b8558a574799cfa34efc04d5f06 (patch) | |
tree | 42de0aaa7626d505bd365a089dc82085e3725233 /src/main/java/at | |
parent | 0d74c351c556c9d86b26d5d024b715a838f804e5 (diff) | |
download | skyhanni-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.kt | 7 |
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 +} |