feat: globale Navigation aus zentraler UX-Runtime laden
This commit is contained in:
@@ -1,6 +1,25 @@
|
||||
(() => {
|
||||
'use strict';
|
||||
|
||||
function loadGlobalNavigationAssets() {
|
||||
if (!document.querySelector('link[data-ux-global-navigation]')) {
|
||||
const stylesheet = document.createElement('link');
|
||||
stylesheet.rel = 'stylesheet';
|
||||
stylesheet.href = '/global-navigation-ux.css?v=1.44.0';
|
||||
stylesheet.setAttribute('data-ux-global-navigation', 'style');
|
||||
document.head.append(stylesheet);
|
||||
}
|
||||
if (!document.querySelector('script[data-ux-global-navigation]')) {
|
||||
const script = document.createElement('script');
|
||||
script.src = '/global-navigation-ux.js?v=1.44.0';
|
||||
script.async = false;
|
||||
script.setAttribute('data-ux-global-navigation', 'script');
|
||||
document.body.append(script);
|
||||
}
|
||||
}
|
||||
|
||||
loadGlobalNavigationAssets();
|
||||
|
||||
const moduleRoot = document.getElementById('admin-modules-panel');
|
||||
const extensionRoot = document.getElementById('extensions');
|
||||
if ((!moduleRoot && !extensionRoot) || document.documentElement.dataset.uxModuleExtensionReady === '1') return;
|
||||
|
||||
Reference in New Issue
Block a user