Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
myElement.innerHTML = 'Click Me'; | myElement.innerHTML = 'Click Me'; | ||
myElement.onclick = function(){alert('hi');} | myElement.onclick = function(){alert('hi');} | ||
+ | |||
+ | if ( mw.config.get( 'wgPageName' ) === 'Mobile_Suits' ) { | ||
+ | console.log("MS"); | ||
+ | } | ||
}()); | }()); |
Revision as of 23:14, 16 April 2020
/* Any JavaScript here will be loaded for all users on every page load. */ $(function () { var myElement = document.getElementById('mw-mywiki-example'); console.log('test wiki js'); myElement.innerHTML = 'Click Me'; myElement.onclick = function(){alert('hi');} if ( mw.config.get( 'wgPageName' ) === 'Mobile_Suits' ) { console.log("MS"); } }());