[FIX] common.js: auto-inject feedback.js su tutte le pagine autenticate

This commit is contained in:
DevEnv nis2-agile 2026-03-10 11:23:31 +01:00
parent 545e01948f
commit 397d6a88d2

View File

@ -788,3 +788,14 @@ function switchLang(lang) {
`;
document.head.appendChild(style);
})();
// ── Auto-inject feedback.js su tutte le pagine autenticate ──────────────────
(function () {
const excluded = ['login.html', 'register.html', 'onboarding.html', 'index.html', ''];
const page = window.location.pathname.split('/').pop();
if (excluded.includes(page)) return;
if (document.querySelector('script[src*="feedback.js"]')) return;
const s = document.createElement('script');
s.src = 'js/feedback.js';
document.body.appendChild(s);
})();