From 140219f75b361fce1d9dec265f78b70202d06d3b Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:45:32 +0200 Subject: Backend: Alert Clock Offsets (#2623) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Co-authored-by: CalMWolfs --- src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt index e209e0ce9..5b42c5dc6 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/OSUtils.kt @@ -7,6 +7,17 @@ import java.net.URI object OSUtils { + val isWindows: Boolean + val isMac: Boolean + val isLinux: Boolean + + init { + val os = System.getProperty("os.name") + isWindows = os.contains("win", ignoreCase = true) + isMac = os.contains("mac", ignoreCase = true) + isLinux = os.contains("linux", ignoreCase = true) + } + @JvmStatic fun openBrowser(url: String) { val desktopSupported = Desktop.isDesktopSupported() @@ -17,7 +28,7 @@ object OSUtils { } catch (e: IOException) { ErrorManager.logErrorWithData( e, "Error while opening website.", - "url" to url + "url" to url, ) } } else { -- cgit