mirror of
https://github.com/jech/galene.git
synced 2024-12-22 07:15:47 +01:00
Make background blur optional.
This commit is contained in:
parent
a00b77fc8f
commit
5bb54803dc
1 changed files with 10 additions and 0 deletions
|
@ -1226,6 +1226,16 @@ let filters = {
|
|||
},
|
||||
'background-blur': {
|
||||
description: 'Background blur',
|
||||
predicate: async function() {
|
||||
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;
|
||||
},
|
||||
init: async function(ctx) {
|
||||
if(!(this instanceof Filter))
|
||||
throw new Error('Bad type for this');
|
||||
|
|
Loading…
Reference in a new issue