Difference between revisions of "MediaWiki:Access.js"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
− | var qId = | + | var qId = $title.find( '.wikibase-title-id' ).text().replace( /[()]/g, '' ) |
− | + | console.log(qID) | |
var api = new mw.Api(); | var api = new mw.Api(); | ||
api.get( { | api.get( { | ||
Line 6: | Line 6: | ||
text: '{{MailtoAccess|'+qId+'}}' | text: '{{MailtoAccess|'+qId+'}}' | ||
} ).done( function ( data ) { | } ).done( function ( data ) { | ||
− | mw.notify( $('<a href="'+data.expandtemplates["*"]+'"> do a SAR to this controller!</a>') ); | + | mw.notify( $('<a href="'+data.expandtemplates["*"]+'"> do a SAR to this controller!</a>') , { autoHide: false } ); |
} ); | } ); | ||
− | |||
− | |||
− |
Revision as of 00:12, 30 March 2019
var qId = $title.find( '.wikibase-title-id' ).text().replace( /[()]/g, '' )
console.log(qID)
var api = new mw.Api();
api.get( {
action: 'expandtemplates',
text: '{{MailtoAccess|'+qId+'}}'
} ).done( function ( data ) {
mw.notify( $('<a href="'+data.expandtemplates["*"]+'"> do a SAR to this controller!</a>') , { autoHide: false } );
} );