mirror of
https://github.com/jech/galene.git
synced 2024-12-22 15:25:48 +01:00
Disable background blur on Safari.
This commit is contained in:
parent
f81094abda
commit
8dc2924369
1 changed files with 15 additions and 5 deletions
|
@ -1251,14 +1251,24 @@ let filters = {
|
||||||
'background-blur': {
|
'background-blur': {
|
||||||
description: 'Background blur',
|
description: 'Background blur',
|
||||||
predicate: async function() {
|
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', {
|
let r = await fetch('/third-party/tasks-vision/vision_bundle.mjs', {
|
||||||
method: 'HEAD',
|
method: 'HEAD',
|
||||||
});
|
});
|
||||||
if(!r.ok && r.status !== 404)
|
if(!r.ok) {
|
||||||
|
if(r.status !== 404)
|
||||||
console.warn(
|
console.warn(
|
||||||
`Fetch vision_bundle.mjs: ${r.status} ${r.statusText}`,
|
`Fetch vision_bundle.mjs: ${r.status} ${r.statusText}`,
|
||||||
);
|
);
|
||||||
return r.ok;
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
init: async function(ctx) {
|
init: async function(ctx) {
|
||||||
if(!(this instanceof Filter))
|
if(!(this instanceof Filter))
|
||||||
|
|
Loading…
Reference in a new issue