MediaWiki
Gadget-breadcrumbs.js
From Dogcraft Wiki
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.
$(document).ready(function() {
/*$("#alertbutton-domino").click(function(){
mw.messages.set({'sandbox-test': 'Testing'});
var wiki_sandbox_obj = new mw.Message( mw.messages, 'sandbox-test' );
mw.log( wiki_sandbox_obj.text() );
mw.notify( mw.message( 'sandbox-test' ) );
});*/
if ( mw.config.get('wgIsArticle')) {
var namespace = mw.config.get('wgFormattedNamespaces')[mw.config.get('wgNamespaceNumber')];
var serverInfo;
if (mw.config.get('wgCategories').includes('Server Information')) {
serverInfo = 'Server Information > ';
}
var worldCat = '';
for (var i = 0; i < mw.config.get('wgCategories').length; i++) {
if ( mw.config.get('wgCategories')[i].indexOf('Survival ') > -1) {
worldCat = mw.config.get('wgCategories')[i] + '';
break;
}
}
$('#breadcrumbs-test').text('' + namespace + ' > ' + serverInfo + worldCat + ' > ' + mw.config.get( 'wgTitle' ));
}
});
This page was last modified on 3 July 2021, at 14:29. (3 months ago)