diff --git a/manifest.json b/manifest.json
index 120ad9823d02cafe9dbef04778e55de3895f4715..399a0d408af048ee4abf6b8d04e5c0e37faa062c 100644
--- a/manifest.json
+++ b/manifest.json
@@ -38,6 +38,11 @@
     "default_title": "ff2BaLex"
   },
 
+  "options_ui": {
+    "page": "src/options/options.html",
+    "open_in_tab": false
+  },
+
   "sidebar_action": {
     "default_title": "BaLex",
     "default_panel": "src/sidebar/sidebar.html",
@@ -59,7 +64,16 @@
         "src/utils/stats.js"],
       "css": ["src/context_menu/custom_context_menu.css"],
       "run_at": "document_idle"
+    },
+    {
+      "matches": ["<all_urls>"],
+      "js": [
+        "src/utils/logger.js",
+        "src/utils/stats.js"
+      ],
+      "run_at": "document_end"
     }
+
   ],
 
   "web_accessible_resources": [
diff --git a/src/utils/logger.js b/src/utils/logger.js
index 79a5229ce4d1dc321648566d944f6cda05ddc37c..1455361feaef60c3e4dc37181c95465cf3f13dbc 100644
--- a/src/utils/logger.js
+++ b/src/utils/logger.js
@@ -2,16 +2,30 @@
  * Mode debug : affiche les logs dans la console
  * Mode prod : masque les logs ainsi que les identifiants des lexiques
 */
-const DEBUG = true; // false en prod
-
-function log(...args) {
-  if (DEBUG) {
-    console.log(...args);
+(function () {
+  if (typeof window !== 'undefined') {
+    if (typeof window.DEBUG === 'undefined') {
+      window.DEBUG = true; // ou false en production
+    }
+    if (!window.log) {
+      function log(...args) {
+        if (window.DEBUG) {
+          console.log(...args);
+        }
+      }
+      window.log = log;
+    }
+  } else if (typeof self !== 'undefined') {
+    if (typeof self.DEBUG === 'undefined') {
+      self.DEBUG = true;
+    }
+    if (!self.log) {
+      function log(...args) {
+        if (self.DEBUG) {
+          console.log(...args);
+        }
+      }
+      self.log = log;
+    }
   }
-}
-
-if (typeof window !== 'undefined') {
-  window.log = log;
-} else if (typeof self !== 'undefined') {
-  self.log = log;
-}
+})();
diff --git a/src/utils/stats.js b/src/utils/stats.js
index c86ddb8a6504a4579df1f9a6336166dc98ac27ea..114c53ed90c7abbafefe5521fe129f64c856bfff 100644
--- a/src/utils/stats.js
+++ b/src/utils/stats.js
@@ -1,3 +1,4 @@
+log("Stats.js chargé.");
 (function () {
 
     if (window.hasRun) {