Jump to content

MediaWiki:Gadget-NamespaceNotice.js: Difference between revisions

From Wikimedia Foundation Governance Wiki
Content deleted Content added
MZMcBride (talk | contribs)
let's try this
outdated, let us use MediaWiki:talkpageheader
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
/* Show a notice inside <div id="contentSub"></div> on pages in the Talk namespace */
if ( mw.config.get( 'wgNamespaceNumber' ) == 1 ) {
var text = $.getJSON(
wgScriptPath + '/api.php?',
{
action: 'parse',
prop: 'text',
page: 'Template:Contribute',
format: 'json'
},
function( data ) {
if ( data ) {
var text = data.parse.text['*'];
$('#contentSub').html(text);
}
}
)
}

Latest revision as of 19:10, 15 July 2014