1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 07:15:47 +01:00

Disable background blur on Safari.

This commit is contained in:
Juliusz Chroboczek 2024-12-15 16:28:10 +01:00
parent f81094abda
commit 8dc2924369

View file

@ -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))