From 509dba144140b386b568fbb6912165aa9428fd75 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 11 May 2024 19:05:14 -0400 Subject: [PATCH] Fix regression in previous commit Related feedback: https://github.com/uBlockOrigin/uAssets/issues/23652#issuecomment-2105555721 Related commit: https://github.com/gorhill/uBlock/commit/2ccc3135c1777d109013722c9e9fd0454acc2a3e --- assets/resources/scriptlets.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 0eda7c83d..d4756a727 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -1055,13 +1055,13 @@ function setLocalStorageItemFn( if ( trusted ) { if ( value.includes('$now$') ) { - value.replaceAll('$now$', Date.now()); + value = value.replaceAll('$now$', Date.now()); } if ( value.includes('$currentDate$') ) { - value.replaceAll('$currentDate$', `${Date()}`); + value = value.replaceAll('$currentDate$', `${Date()}`); } if ( value.includes('$currentISODate$') ) { - value.replaceAll('$currentISODate$', (new Date()).toISOString()); + value = value.replaceAll('$currentISODate$', (new Date()).toISOString()); } } else { const normalized = value.toLowerCase();