Nenda kwa yaliyomo

MediaWiki:Gadget-TwoColumnTable.js

Kutoka wikishia

Elewa - Baada ya kuhifadhi, itakubidi uzungushe kivinjali kache chako ili kuona mabadiliko.

  • Firefox / Safari: Shikiria Shift wakati unabonyeza Reload, au aidha bonyeza Ctrl-F5 au Ctrl-R (⌘-R kwa Mac);
  • Google Chrome: Bonyeza Ctrl-Shift-R (⌘-Shift-R kwa Mac)
  • Konqueror: Bonyeza Reload au bonyeza F5;
  • Opera: Futa kache kwenye Tools → Preferences;
  • Internet Explorer: Shikiria Ctrl wakati unabonyeza Refresh, au bonyeza 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");
    });
});