MediaWiki talk:Gadget-PopupsFix.js

From Wikidata
Jump to navigation Jump to search

Official rewrite of the extension[edit]

Hi there User:Bene and others! I just found out about this code so apologies for not giving you more notice, but this code is likely to break within the next 2 weeks. There's been a big rewrite of the Popups extension that is available on the mpga branch and we hadn't realised this workaround existed.

This gadget after a brief look is likely to need a rewrite or be disabled when that happens.

Let me know if you have any questions or if there is anything I can help with to port over to the new branch! We hope that the new code will make it easier to provide a more robust support for Wikidata in future. Jdlrobson (talk) 19:05, 14 February 2017 (UTC)[reply]

Crashes on special pages[edit]

{{Edit request}} Please change the following line:

if ( !mw.loader.getState( 'ext.popups.desktop' ).match( /loading|loaded|ready/ ) ) {

… into this:

var state = mw.loader.getState( 'ext.popups.desktop' );
if ( !state || !state.match( /loading|loaded|ready/ ) ) {

This is more a hack than anything but will fix the current problem. --Thiemo Mättig (WMDE) 14:20, 26 March 2017 (UTC)[reply]

✓ Done. Sjoerd de Bruin (talk) 14:25, 26 March 2017 (UTC)[reply]