From 884b0b5f9cb958a9308a8290187fb0e874cd47dd Mon Sep 17 00:00:00 2001 From: Lloyd Bayley Date: Sat, 22 Jun 2024 18:12:39 +1000 Subject: [PATCH] Remove unnecessary userAgent Checks (#118) For some reason "Mac" and "Chrome" were included, stopping live spectrogram on Macs. Only needs to be iPhone because it doesn't work on there. Tested on Mac FF, Chrome & Safari. --- scripts/spectrogram.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/spectrogram.php b/scripts/spectrogram.php index 2ad0dba..59b1c54 100644 --- a/scripts/spectrogram.php +++ b/scripts/spectrogram.php @@ -126,7 +126,7 @@ window.onload = function(){ }; // if user agent includes iPhone or Mac use legacy mode - if(((window.navigator.userAgent.includes("iPhone") || window.navigator.userAgent.includes("Mac")) && !window.navigator.userAgent.includes("Chrome")) || legacy == true) { + if(window.navigator.userAgent.includes("iPhone") || legacy == true) { document.getElementById("spectrogramimage").style.display=""; document.body.querySelector('canvas').remove(); document.getElementById('player').remove();