Difference between revisions of "MediaWiki:Access.js"

From Wikibase Personal data
Jump to navigation Jump to search
Line 5: Line 5:
 
api.get( {
 
api.get( {
 
     action: 'expandtemplates',
 
     action: 'expandtemplates',
     meta: 'userinfo'
+
     text: '{{MailtoAccess|Q101}}'
 
} ).done( function ( data ) {
 
} ).done( function ( data ) {
 
     console.log( data );
 
     console.log( data );

Revision as of 23:47, 29 March 2019

var qId = "Q101"
var url = "/w/api.php?action=expandtemplates&format=json&text=%7B%7BMailtoAccess%7C" + qId +"%7D%7D&prop=wikitext"

var api = new mw.Api();
api.get( {
    action: 'expandtemplates',
    text: '{{MailtoAccess|Q101}}'
} ).done( function ( data ) {
    console.log( data );
} );


mw.notify( url, { autoHide: false } );