Difference between revisions of "MediaWiki:Common.js"

From AlHaq
Jump to navigation Jump to search
Line 10: Line 10:
 
child.parentNode.insertBefore(text, child);
 
child.parentNode.insertBefore(text, child);
  
child.insertAdjacentHTML( 'beforeBegin', '<br />testing' );
+
child.insertAdjacentHTML( 'beforeBegin', text );
 
}
 
}

Revision as of 07:47, 17 May 2014

/* Any JavaScript here will be loaded for all users on every page load. */

window.onload=addNavigation;

function addNavigation()
{

var text = document.createTextNode('<div class="navigators"> navigators </div>');
var child = document.getElementById('catlinks');
child.parentNode.insertBefore(text, child);

child.insertAdjacentHTML( 'beforeBegin', text );
}