Jump to content

MediaWiki:Gadget-TwoColumnTable.js

Daga wikishia

Asani: Bayan wallafawa, zaku yi juyar da cache na browser din ku dan ganin sauye-sauye.

  • Firefox / Safari: Rike Shift asanda kuke danna Reload, ko danna kodai Ctrl-F5 ko kuma Ctrl-R (⌘-R akan Mac)
  • Google Chrome: Danna Ctrl-Shift-R (⌘-Shift-R akan Mac)
  • Internet Explorer / Edge: Rike Ctrl asanda kuke danna Refresh, ko latsa Ctrl-F5
  • Opera: Danna Ctrl-F5.
document.addEventListener("DOMContentLoaded", function () {
    const tableContainer = document.querySelector(".table-container");
    const buttons = {
        smaller: document.querySelector(".font-smaller"),
        larger: document.querySelector(".font-larger"),
        nightMode: document.querySelector(".toggle-night-mode"),
    };

    buttons.smaller.addEventListener("click", function () {
        tableContainer.classList.remove("font-larger");
        tableContainer.classList.add("font-smaller");
    });

    buttons.larger.addEventListener("click", function () {
        tableContainer.classList.remove("font-smaller");
        tableContainer.classList.add("font-larger");
    });

    buttons.nightMode.addEventListener("click", function () {
        document.body.classList.toggle("night-mode");
    });
});