mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-28 02:00:06 +00:00
185bce5859
Previously there was a race condition where the qrcode would not show if the startup module finished loading prior to the div that should contain the qrcode being loaded. This quite commonly happened on wikipedia during a hit where js is cached (But does not happen locally, my theory is that that is due to how packets get split over the network but not from localhost). Change it to use a normal RL module, as that seems best practise. Also do not load the qrcode js on special pages that do not use it. Finially, remove position:top as its not needed. Bug: T136988 Change-Id: I5139f222207203d834bdc979b21c1fc94f242ac2
7 lines
144 B
JavaScript
7 lines
144 B
JavaScript
(function ( $ ) {
|
|
$( function () {
|
|
var $elm = $( '.mw-display-qrcode' );
|
|
$elm.qrcode( $elm.data( 'mw-qrcode-url' ) );
|
|
} );
|
|
} )( jQuery );
|