Geen bewerkingssamenvatting |
k (1 versie geïmporteerd: Zie Jira-task KP-222.) |
||
(6 tussenliggende versies door 3 gebruikers niet weergegeven) | |||
Regel 1: | Regel 1: | ||
<noinclude> | <noinclude>Dit is de Widget:EMMNavigatorTree Widget.</noinclude> | ||
</noinclude> | |||
<includeonly> | <includeonly> | ||
<div id="emm-navtree" class="demo" style="margin-top:1em;"></div> | |||
<div id=" | |||
<link rel="stylesheet" type="text/css" href="../extensions/emm-navigation-tree/js/lib/style.css"> | <link rel="stylesheet" type="text/css" href="../extensions/emm-navigation-tree/js/lib/style.css"> | ||
<script type="text/javascript"> | |||
function checkIfReadyAndExecute() | |||
{ | |||
var c='<!--{$rootPages}-->'; | |||
var emmNavigationTree=new EMMNavigationTree(mw, | |||
"<!--{$currentPageName|default:'Pagename niet doorgekregen'}-->",c); | |||
} | |||
RLQ.push(function () { | |||
function waitForMwLoaderUsing(callback) { | |||
if (typeof mw !== 'undefined' && mw.loader && typeof mw.loader.using === 'function') { | |||
callback(); | |||
} else { | |||
console.warn('mw.loader.using is not available yet. Retrying...'); | |||
setTimeout(function() { | |||
waitForMwLoaderUsing(callback); | |||
}, 100); // Retry every 100 milliseconds | |||
} | |||
} | } | ||
waitForMwLoaderUsing(function () { | |||
mw.loader.using(['ext.EMMNavigationTree', 'mediawiki.api']) | |||
.then(function () { | |||
console.log('Modules loaded'); | |||
checkIfReadyAndExecute(); | |||
}) | |||
.catch(function (err) { | |||
console.error('Error loading modules:', err); | |||
}); | |||
}); | |||
}); | |||
</script> | |||
</includeonly> | </includeonly> |
Huidige versie van 15 okt 2024 om 16:47
Dit is de Widget:EMMNavigatorTree Widget.