From 5b6049bb1eea4670f2e44d7a88894d3c4770c18d Mon Sep 17 00:00:00 2001 From: CNCKitchen Date: Wed, 1 Apr 2026 11:15:35 +0200 Subject: [PATCH] refactor: simplify canvas filter support check --- js/main.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/js/main.js b/js/main.js index 74d5146..5316ee6 100644 --- a/js/main.js +++ b/js/main.js @@ -60,13 +60,7 @@ const settings = { }; // ── Canvas filter support (Safari / iOS WebView don't support ctx.filter) ──── -const CANVAS_FILTER_SUPPORTED = (() => { - try { - const ctx = document.createElement('canvas').getContext('2d'); - ctx.filter = 'blur(1px)'; - return ctx.filter === 'blur(1px)'; - } catch (e) { return false; } -})(); +const CANVAS_FILTER_SUPPORTED = 'filter' in CanvasRenderingContext2D.prototype; /** * Box-blur one row of RGBA pixels (horizontal pass).