Zum Inhalt springen

MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Schutzanlage
Die Seite wurde neu angelegt: „$(document).ready(function () { const toggle = $('<button>') .text('🌓 Dark Mode') .attr('id', 'toggle-dark') .css({ position: 'fixed', top: '1em', right: '1em', zIndex: 999, padding: '0.5em', background: '#1a1a1a', color: '#eee', border: '1px solid #444', borderRadius: '4px', cursor: 'pointer' }) .click(function () { $('body').toggleClass('dark-mode'); }); $('…“
 
Die Seite wurde geleert.
Markierung: Geleert
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 1: Zeile 1:
$(document).ready(function () {
 
  const toggle = $('<button>')
    .text('🌓 Dark Mode')
    .attr('id', 'toggle-dark')
    .css({
      position: 'fixed',
      top: '1em',
      right: '1em',
      zIndex: 999,
      padding: '0.5em',
      background: '#1a1a1a',
      color: '#eee',
      border: '1px solid #444',
      borderRadius: '4px',
      cursor: 'pointer'
    })
    .click(function () {
      $('body').toggleClass('dark-mode');
    });
  $('body').append(toggle);
});

Aktuelle Version vom 16. Juni 2025, 20:42 Uhr