Difference between revisions of "MediaWiki:Common.js"

From Yo-Kai Watch Wiki
Jump to: navigation, search
(Created page with "Any JavaScript here will be loaded for all users on every page load.: if ( mw.config.get( 'wgPageName' ) === 'Chatbox' ) { <script id="cid0020000129691298855" data-c...")
 
 
(20 intermediate revisions by the same user not shown)
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. */
 
+
/*
if ( mw.config.get( 'wgPageName' ) === 'Chatbox' ) {
+
if ($('.mw-headline:first').length > 0) {
    <script id="cid0020000129691298855" data-cfasync="false" async src="//st.chatango.com/js/gz/emb.js" style="width: 100%;height: 100%;">{"handle":"yo-kaiwatchfans","arch":"js","styles":{"a":"CC0000","b":100,"c":"FFFFFF","d":"FFFFFF","k":"CC0000","l":"CC0000","m":"CC0000","n":"FFFFFF","p":"10","q":"CC0000","r":100,"cnrs":"0.35"}}</script>
+
console.log('exists')
 +
$('.mw-headline:first').parent().after('test test')
 +
} else {
 +
console.log('do not exist')
 +
$('#firstHeading').after('test2 test2')
 
}
 
}

Latest revision as of 02:48, 4 January 2021

/* Any JavaScript here will be loaded for all users on every page load. */
/*
if ($('.mw-headline:first').length > 0) {
console.log('exists')
$('.mw-headline:first').parent().after('test test')
} else {
console.log('do not exist')
$('#firstHeading').after('test2 test2')
}