From b5ee2b953af8c209c783aae4bd1f3ef92f4cc57b Mon Sep 17 00:00:00 2001 From: Jesse Hasty <134172009+JesseWx2011@users.noreply.github.com> Date: Thu, 28 Mar 2024 08:55:58 -0400 Subject: [PATCH] (No Update) Fixed 2 Alerts Popping Up. --- notification.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/notification.js b/notification.js index f43199e..cb4dba5 100644 --- a/notification.js +++ b/notification.js @@ -24,12 +24,12 @@ async function litening() { }); setTimeout(() => { notification.close() }, 5000); alertaudio.innerHTML = `` - alert("Lightning Alert", { - body: `Lightning struck ${response[0].relativeTo.distanceMI} miles (${response[0].relativeTo.distanceKM} km) ${response[0].relativeTo.bearingENG} of this Location in ${city}.`, - icon: "lightning.svg", - }) - }}; + if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ + alert(`Lightning struck ${response[0].relativeTo.distanceMI} miles (${response[0].relativeTo.distanceKM} km) ${response[0].relativeTo.bearingENG} of this Location in ${city}.`) + } litening() } +} +} notifyMe()