MediaWiki:Gadget-cs.js: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
Bongolium500 (talk | contribs) (Created page with "mw.hook( 'wikipage.content' ).add( function ( $content ) { $('.cs-js').each(function(){ →'this' means the element: Morebits.wiki.preview(this).beginRender("{{cite source|Rose (TV story)}}"); }); } );") |
Bongolium500 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
mw.hook( 'wikipage.content' ).add( function ( $content ) { | mw.hook( 'wikipage.content' ).add( function ( $content ) { | ||
$('.cs-js').each(function(){ /* 'this' means the element */ | $('.cs-js').each(function(){ /* 'this' means the element */ | ||
Morebits.wiki.preview(this).beginRender("{{cite source|Rose (TV story)}}"); | var preview = Morebits.wiki.preview(this); | ||
preview.beginRender("{{cite source|Rose (TV story)}}"); | |||
}); | }); | ||
} ); | } ); |