diff --git a/manifest.json b/manifest.json index d465f43555b8ab019dc62e2f4ffae2a8cba59b1c..120ad9823d02cafe9dbef04778e55de3895f4715 100644 --- a/manifest.json +++ b/manifest.json @@ -38,11 +38,6 @@ "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", @@ -64,13 +59,7 @@ "src/utils/stats.js"], "css": ["src/context_menu/custom_context_menu.css"], "run_at": "document_idle" - }, - { - "matches": ["<all_urls>"], - "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 e4907fd198f64dce7f763a751e50ff72840c9f2f..79a5229ce4d1dc321648566d944f6cda05ddc37c 100644 --- a/src/utils/logger.js +++ b/src/utils/logger.js @@ -1,12 +1,17 @@ - /** * Mode debug : affiche les logs dans la console * Mode prod : masque les logs ainsi que les identifiants des lexiques */ -const DEBUG = false; // false en prod +const DEBUG = true; // false en prod function log(...args) { if (DEBUG) { console.log(...args); } } + +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 fd2c702ea768fa2ebac57c1ce0237967816849a8..c86ddb8a6504a4579df1f9a6336166dc98ac27ea 100644 --- a/src/utils/stats.js +++ b/src/utils/stats.js @@ -1,4 +1,5 @@ (function () { + if (window.hasRun) { return; } @@ -310,7 +311,7 @@ rect.setAttribute("stroke-width", "0.5"); rect.setAttribute("stroke-dasharray", "200 200"); rect.setAttribute("stroke-dashoffset", "400"); - rect.style.animation = "dashAnimation 8s ease-in-out infinite"; + rect.style.animation = "dashAnimation 6s ease-in-out infinite"; svg.appendChild(rect); document.body.appendChild(svg); diff --git a/src/workers/pyodide_worker.js b/src/workers/pyodide_worker.js index 246c47f6fb6b553b5f75620aab89b12492d0bf8f..45f9e7745dda83884b2d7a66b539e34e182bb15b 100644 --- a/src/workers/pyodide_worker.js +++ b/src/workers/pyodide_worker.js @@ -1,3 +1,4 @@ +importScripts("../utils/logger.js"); log("✅ pyodide_worker.js chargé avec succès !"); // URL de la version Pyodide la plus récente