MediaWiki

Gadget-breadcrumbs.js

From Dogcraft Wiki

No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 9: Line 9:
var worldCat = '';
var worldCat = '';
for (let i = 0; i < mw.config.get('wgCategories').length; i++) {
for (var i = 0; i < mw.config.get('wgCategories').length; i++) {
if ( mw.config.get('wgCategories')[i].includes('Survival ') == true) {
if ( mw.config.get('wgCategories')[i].indexOf('Survival ') > -1) {
     worldCat = mw.config.get('wgCategories')[i] + '';
     worldCat = mw.config.get('wgCategories')[i] + '';
         break;
         break;

Revision as of 03:04, 3 July 2021

$(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' ) );
	});*/
	
	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('' + mw.config.get('wgFormattedNamespaces')[mw.config.get('wgNamespaceNumber')] + ' > ' + worldCat + ' > ' + mw.config.get( 'wgTitle' ));
		
});
This page was last modified on 3 July 2021, at 03:04. (3 months ago)