mediawiki-extensions-Popups/resources/ext.popups.targets/mobileTarget.js
Florian c93047666e Add link preview feature to mobile beta mode
Linkpreview will try to fetch a text extract using the api and, if this
doesn't fail, show the extract as a drawer with a button "Continue to
article". If the query fails, it will redirect the user to the article
directly.

Bug: T113243
Depends-On: I6d8c5b80e70c3d8d1a92a70cc91e1b90d598cb0f
Change-Id: Idbaae9fe2decd89b73e623a25fbd39464c316fb2
2016-03-05 18:22:30 +01:00

16 lines
377 B
JavaScript

( function ( $, mw ) {
// FIXME: There should be a way to turn this off
mw.popups.enabled = true;
/**
* Triggers when a popup should be rendered.
*/
mw.popups.triggers = 'click';
mw.hook( 'wikipage.content' ).add( function ( $content ) {
mw.popups.$content = $content;
mw.popups.setupTriggers( mw.popups.selectPopupElements() );
} );
} )( jQuery, mediaWiki );