Difference between revisions of "MediaWiki:Common.js"

From CSE330 Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
 +
 +
window.___gcfg = {
 +
  lang: 'zh-CN',
 +
  parsetags: 'onload'
 +
};
  
 
document.addEventListener("DOMContentLoaded", function(){
 
document.addEventListener("DOMContentLoaded", function(){

Revision as of 00:44, 7 October 2013

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

window.___gcfg = {
  lang: 'zh-CN',
  parsetags: 'onload'
};

document.addEventListener("DOMContentLoaded", function(){
	
	var gPlusStr = '<g:plusone size="standard"></g:plusone><script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>';
	
	var navig = document.getElementById("p-navigation");
	
	var container = document.createElement("div");
	
	navig.parentNode.insertBefore(container, navig.nextSibling);
	
	container.innerHTML = gPlusStr;
	
});