| Line 1: |
Line 1: |
| | // License: GPL | | // License: GPL |
| | | | |
| − | mw.notify( "popup.js")
| + | var $title = $( '.wikibase-title' ), |
| | + | qId = $title.find( '.wikibase-title-id' ).text().replace( /[()]/g, '' ); |
| | | | |
| − | console.log( "it's a controller" )
| |
| − | var $title2 = $( '.wikibase-title' ),
| |
| − | qId = $title2.find( '.wikibase-title-id' ).text().replace( /[()]/g, '' );
| |
| | | | |
| | + | var api = new mw.Api(); |
| | + | api.get( { |
| | + | action: 'expandtemplates', |
| | + | text: '{{PopupMenu|qID='+qId+'}}' |
| | + | } ).done( function ( data ) { |
| | + | var expanded = data.expandtemplates["*"] |
| | | | |
| − | var api = new mw.Api();
| + | mw.notify( expanded , { autoHide: false } ); |
| − | api.get( {
| + | } ); |
| − | action: 'expandtemplates',
| |
| − | text: '{{Menu|qID='+qId+'}}'
| |
| − | } ).done( function ( data ) {
| |
| − | var expanded = $(data.expandtemplates["*"])
| |
| − | console.log(expanded)
| |
| − | mw.notify( expanded , { autoHide: false } );
| |
| − | } );
| |