MD Umbau
This commit is contained in:
13
kb-markdown-importer/assets/js/frontend.js
Normal file
13
kb-markdown-importer/assets/js/frontend.js
Normal file
@@ -0,0 +1,13 @@
|
||||
(function () {
|
||||
const switcher = document.getElementById('kb-version-switcher');
|
||||
if (!switcher) {
|
||||
return;
|
||||
}
|
||||
|
||||
switcher.addEventListener('change', function () {
|
||||
const selected = switcher.options[switcher.selectedIndex];
|
||||
if (selected && selected.dataset.url) {
|
||||
window.location.href = selected.dataset.url;
|
||||
}
|
||||
});
|
||||
}());
|
||||
Reference in New Issue
Block a user