From 41c9c6d9a9924d0ea36d3a709a3d7209daa12c30 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 20 Feb 2025 00:13:14 +0300 Subject: [PATCH] fix #1926: performance.now() doesn't change in Firefox --- src/content/style-injector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/style-injector.js b/src/content/style-injector.js index 66860e77d2..746e23ec89 100644 --- a/src/content/style-injector.js +++ b/src/content/style-injector.js @@ -177,7 +177,7 @@ function createStyle(style) { let {id} = style; if (ass) { if (!exposeStyleName) - id = randomIds[id] ??= performance.now().toString(36); + id = randomIds[id] ??= Math.random().toString(36).slice(2); id = MEDIA + id; el = new CSSStyleSheet({media: id}); setTextAndName(el, style);