Difference between revisions of "MediaWiki:Access.js"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
api.get( { | api.get( { | ||
action: 'expandtemplates', | action: 'expandtemplates', | ||
− | text: '{{MailtoAccess|'+ | + | text: '{{MailtoAccess|'+qId+'}}' |
} ).done( function ( data ) { | } ).done( function ( data ) { | ||
mw.notify( "<a href="+data.expandtemplates+"> do a SAR</a>" ); | mw.notify( "<a href="+data.expandtemplates+"> do a SAR</a>" ); |
Revision as of 23:59, 29 March 2019
var qId = "Q101"
var api = new mw.Api();
api.get( {
action: 'expandtemplates',
text: '{{MailtoAccess|'+qId+'}}'
} ).done( function ( data ) {
mw.notify( "<a href="+data.expandtemplates+"> do a SAR</a>" );
console.log(data.expandtemplates);
} );
mw.notify( "hello", { autoHide: false } );