MediaWiki:Common.js

From San Andreas Multiplayer
Revision as of 09:00, 3 November 2024 by Varrez (talk | contribs) (Created page with "// Laden von Highlight.js über CDN mw.loader.load('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js'); // Laden eines Highlight.js-Themes (z. B. default oder monokai) mw.loader.load('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/default.min.css', 'text/css'); // Initialisieren von Highlight.js nach dem Laden der Seite $(document).ready(function() { $('pre code').each(function(i, block) { hljs.highlightElement(...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// Laden von Highlight.js über CDN
mw.loader.load('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/highlight.min.js');

// Laden eines Highlight.js-Themes (z. B. default oder monokai)
mw.loader.load('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/default.min.css', 'text/css');

// Initialisieren von Highlight.js nach dem Laden der Seite
$(document).ready(function() {
    $('pre code').each(function(i, block) {
        hljs.highlightElement(block);
    });
});