Jhobs has uploaded a new change for review.
https://gerrit.wikimedia.org/r/187241
Change subject: Fix routing capabilities
......................................................................
Fix routing capabilities
Mobile FrontEnd changed the scope of the Router, this
patch updates to that change to fix interstitials
Change-Id: I57b7085bf2ddbfafc2b41e5f15505271b70d3308
---
M modules/ZeroInfo.js
M modules/ZeroOverlay.js
2 files changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner
refs/changes/41/187241/1
diff --git a/modules/ZeroInfo.js b/modules/ZeroInfo.js
index 1d85ffa..8769e22 100644
--- a/modules/ZeroInfo.js
+++ b/modules/ZeroInfo.js
@@ -1,7 +1,8 @@
/* global mw, OO, jQuery */
( function( M, $ ) {
'use strict';
- var settings = M.require( 'settings'),
+ var settings = M.require( 'settings' ),
+ router = M.require( 'router' ),
ZeroInfo,
windowManager;
@@ -54,12 +55,12 @@
this.windowManager.openWindow( dialog );
// Listen to router and hide dialog on URL change
- M.router.once( 'route', function () {
+ router.once( 'route', function () {
windowManager.clearWindows();
} );
};
- M.router.route( /^\/zeroinfo/, function () {
+ router.route( /^\/zeroinfo/, function () {
return new ZeroInfo();
} );
diff --git a/modules/ZeroOverlay.js b/modules/ZeroOverlay.js
index c86b9bf..29e49ec 100644
--- a/modules/ZeroOverlay.js
+++ b/modules/ZeroOverlay.js
@@ -2,6 +2,7 @@
( function( M, $ ) {
'use strict';
var settings = M.require( 'settings' ),
+ router = M.require( 'router' ),
ZeroOverlay,
windowManager;
@@ -59,15 +60,15 @@
this.windowManager.openWindow( dialog );
// Listen to router and hide dialog on URL change
- M.router.once( 'route', function () {
+ router.once( 'route', function () {
windowManager.clearWindows();
} );
};
- M.router.route( /^\/zerosite\/(.*)/, function( url ) {
+ router.route( /^\/zerosite\/(.*)/, function( url ) {
return new ZeroOverlay( { url: url, image: false } );
} );
- M.router.route( /^\/zerofile\/(.*)/, function( url ) {
+ router.route( /^\/zerofile\/(.*)/, function( url ) {
return new ZeroOverlay( { url: url, image: true } );
} );
--
To view, visit https://gerrit.wikimedia.org/r/187241
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I57b7085bf2ddbfafc2b41e5f15505271b70d3308
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroBanner
Gerrit-Branch: master
Gerrit-Owner: Jhobs <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits