Difference between revisions of "MediaWiki:Common.js"
From CSE330 Wiki
Jump to navigationJump to searchm |
m |
||
Line 8: | Line 8: | ||
var container = document.createElement("div"); | var container = document.createElement("div"); | ||
− | |||
navig.parentNode.insertBefore(container, navig.nextSibling); | navig.parentNode.insertBefore(container, navig.nextSibling); | ||
+ | |||
+ | container.innerHTML = gPlusStr; | ||
}); | }); |
Revision as of 05:41, 7 October 2013
/* Any JavaScript here will be loaded for all users on every page load. */
document.addEventListener("DOMContentLoaded", function(){
var gPlusStr = '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script><g:plusone size="standard"></g:plusone>';
var navig = document.getElementById("p-navigation");
var container = document.createElement("div");
navig.parentNode.insertBefore(container, navig.nextSibling);
container.innerHTML = gPlusStr;
});