bavbavhaus.net/js/place.js

12 lines
465 B
JavaScript

addEventListener("DOMContentLoaded", (event) => {
const mainEl = document.body.querySelector("main");
mainEl.querySelectorAll("article.mainpage>article.inlinepage").forEach(inlineArticleEl => {
// remove nested inlines
inlineArticleEl.querySelectorAll(":scope>article.inlinepage").forEach(inlineInlineArticleEl => {
inlineArticleEl.removeChild(inlineInlineArticleEl);
});
// append to main
mainEl.appendChild(inlineArticleEl);
})
})