Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1: −
console.log("launching popup menu")
+
// License: GPL
 +
 
 
var $title = $( '.wikibase-title' ),
 
var $title = $( '.wikibase-title' ),
 
qId = $title.find( '.wikibase-title-id' ).text().replace( /[()]/g, '' );
 
qId = $title.find( '.wikibase-title-id' ).text().replace( /[()]/g, '' );
 +
 +
 
var api = new mw.Api();
 
var api = new mw.Api();
 
api.get( {
 
api.get( {
Line 7: Line 10:  
     text: '{{PopupMenu|qID='+qId+'}}'
 
     text: '{{PopupMenu|qID='+qId+'}}'
 
} ).done( function ( data ) {
 
} ).done( function ( data ) {
     var expanded = $(data.expandtemplates["*"]
+
     var expanded = data.expandtemplates["*"]
    console.log("Expanded", expanded)
+
 
     mw.notify(expanded ) , { autoHide: false } );
+
     mw.notify( expanded , { autoHide: false } );
 
} );
 
} );

Navigation menu