From 28aa44aeffe83aeeed434122471d7064d5646b25 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 20 Jun 2024 14:53:39 -0400 Subject: [PATCH] remove listener for DOMContentLoaded --- static/js/features.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/static/js/features.js b/static/js/features.js index 27acadf..d24ce0d 100644 --- a/static/js/features.js +++ b/static/js/features.js @@ -95,17 +95,10 @@ }; // Set up the localized features object with methods - const attachMethodsToObject = () => { - const methods = { - isEnabled, - enable, - disable, - }; - window.NewfoldFeatures = { ...window.NewfoldFeatures, ...methods }; + const methods = { + isEnabled, + enable, + disable, }; - - // Attach methods when DOM is ready - window.addEventListener( 'DOMContentLoaded', () => { - attachMethodsToObject(); - } ); + window.NewfoldFeatures = { ...window.NewfoldFeatures, ...methods }; }