diff --git a/plugins/carhop-blocks/src/reportages-list/view.js b/plugins/carhop-blocks/src/reportages-list/view.js index ac37b58..e69de29 100644 --- a/plugins/carhop-blocks/src/reportages-list/view.js +++ b/plugins/carhop-blocks/src/reportages-list/view.js @@ -1,29 +0,0 @@ -document.addEventListener("DOMContentLoaded", function () { - const toolbar = document.querySelector("#press-toolbar"); - if (!toolbar) return; - const toolbarButtons = toolbar.querySelectorAll("button"); - const ressourcesGridContentWrapper = document.querySelector( - ".ressources-grid-content-wrapper" - ); - - function setActiveTab(currentButton) { - toolbarButtons.forEach((button) => { - button.setAttribute("aria-selected", "false"); - }); - - currentButton.setAttribute("aria-selected", "true"); - ressourcesGridContentWrapper.setAttribute( - "data-active-tab", - currentButton.getAttribute("data-tab") - ); - } - - function initToolbar() { - toolbarButtons.forEach((button) => { - button.addEventListener("click", function () { - setActiveTab(button); - }); - }); - } - initToolbar(); -});