MediaWiki:Vector.js

Uit Wildpluk wiki
Versie door OZZ (overleg | bijdragen) op 27 mei 2024 om 01:36 (Nieuwe pagina aangemaakt met '→‎Alle hier geplaatste JavaScript-code wordt geladen voor gebruikers van de vormgeving Vector: window.onload = function() { // Get the current month (1-based) var n = new Date().getMonth() + 1; // Select the nth child of the element with class 'tabber__tabs' var element = document.querySelector('.pluktips .tabber__tabs :nth-child(' + n + ')'); // Trigger the click event if the element exists if (element) { element.click();...')
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)

Opmerking: nadat u de wijzigingen hebt gepubliceerd is het wellicht nodig uw browsercache te legen.

  • Firefox / Safari: houd Shift ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5 of Ctrl-R (⌘-Shift-R op een Mac)
  • Google Chrome: druk op Ctrl-Shift-R (⌘-Shift-R op een Mac)
  • Internet Explorer / Edge: houd Ctrl ingedrukt terwijl u op Vernieuwen klikt of druk op Ctrl-F5
  • Opera: druk op Ctrl-F5.
/* Alle hier geplaatste JavaScript-code wordt geladen voor gebruikers van de vormgeving Vector */
window.onload = function() {
    // Get the current month (1-based)
    var n = new Date().getMonth() + 1;

    // Select the nth child of the element with class 'tabber__tabs'
    var element = document.querySelector('.pluktips .tabber__tabs :nth-child(' + n + ')');

    // Trigger the click event if the element exists
    if (element) {
        element.click();
    }
};