MediaWiki:Common.css
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// Load Prism.js (ensure correct path)
importScriptURI('/prism.js'); // Adjust if necessary
// Optional: log to check if Prism.js is loaded
if (typeof Prism !== "undefined") {
console.log("Prism.js loaded successfully.");
} else {
console.error("Prism.js is not loaded.");
}
// Initialize syntax highlighting after page load
$(document).ready(function() {
if (typeof Prism !== "undefined") {
Prism.highlightAll();
console.log("Prism.js executed successfully on all code blocks.");
} else {
console.error("Prism.js not found when trying to highlight code.");
}
});