Commit 5bb54803 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Make background blur optional.

parent a00b77fc
...@@ -1226,6 +1226,16 @@ let filters = { ...@@ -1226,6 +1226,16 @@ let filters = {
}, },
'background-blur': { 'background-blur': {
description: '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) { init: async function(ctx) {
if(!(this instanceof Filter)) if(!(this instanceof Filter))
throw new Error('Bad type for this'); throw new Error('Bad type for this');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment