MediaWiki:Common.js
Aus lernlog Hilfesystem
Hinweis: Leere nach dem Veröffentlichen den Browser-Cache, um die Änderungen sehen zu können.
- Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
- Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
- Internet Explorer/Edge: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
- Opera: Strg+F5
$(document).ready(function() {
console.log("Custom loaded");
const localPath = '/corp/';
require(localPath + 'toolbox.js');
//require(localPath + 'sidebar.js');
require(localPath + 'catparser.js');
require(localPath + 'hide_categories_on_cat_search.js');
require(localPath + 'hide_namespaces_on_search.js');
require(localPath + 'delete_orphaned_files.js');
require(localPath + 'related_pages.js');
require(localPath + 'highlighter.js');
require(localPath + 'totop.js');
console.log("Custom done");
});
// load a js file on-the-fly
function require(script) {
$.ajax({
url: script,
dataType: "script",
async: false, // <-- This is the key
success: function () {
// all good...
},
error: function () {
throw new Error("Could not load script " + script);
}
});
}