From 8dc29243691e6945d8e0d3bf49e02da1e29181ae Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sun, 15 Dec 2024 16:28:10 +0100 Subject: [PATCH] Disable background blur on Safari. --- static/galene.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/static/galene.js b/static/galene.js index 0684342..586a04a 100644 --- a/static/galene.js +++ b/static/galene.js @@ -1251,14 +1251,24 @@ let filters = { 'background-blur': { description: 'Background blur', predicate: async function() { + if(isSafari()) { + console.warn( + 'Background blur does not work on Safari, disabled.' + ); + return false; + + } let r = await fetch('/third-party/tasks-vision/vision_bundle.mjs', { method: 'HEAD', }); - if(!r.ok && r.status !== 404) - console.warn( - `Fetch vision_bundle.mjs: ${r.status} ${r.statusText}`, - ); - return r.ok; + if(!r.ok) { + if(r.status !== 404) + console.warn( + `Fetch vision_bundle.mjs: ${r.status} ${r.statusText}`, + ); + return false; + } + return true; }, init: async function(ctx) { if(!(this instanceof Filter))