mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 00:03:56 +00:00
mmv: Use mediawiki.router instead of underlying oojs-router module
This is in preparation for merging the two modules in core and not exposing oojs-router directly. mediawiki.router is merely 1 line of code to hold a singleton, and indeed it appears there is no need for multiple instances to exist given it communicates exclusively to and from the 'window' object, which is also a global singleton. Change-Id: Ice09b523dfbefd67493175554eeb525771e8f29d
This commit is contained in:
parent
b1ff2dc44b
commit
cd4da296c2
|
@ -96,11 +96,11 @@
|
|||
"mediawiki.Title",
|
||||
"mediawiki.Uri",
|
||||
"mediawiki.jqueryMsg",
|
||||
"mediawiki.router",
|
||||
"mediawiki.storage",
|
||||
"mediawiki.user",
|
||||
"mediawiki.util",
|
||||
"oojs",
|
||||
"oojs-router",
|
||||
"jquery.fullscreen",
|
||||
"jquery.color",
|
||||
"jquery.tipsy",
|
||||
|
@ -332,14 +332,14 @@
|
|||
],
|
||||
"dependencies": [
|
||||
"mediawiki.api",
|
||||
"mediawiki.router",
|
||||
"mediawiki.ui.button",
|
||||
"mediawiki.ui.icon",
|
||||
"mediawiki.Title",
|
||||
"mediawiki.user",
|
||||
"mediawiki.storage",
|
||||
"mmv.head",
|
||||
"oojs",
|
||||
"oojs-router"
|
||||
"oojs"
|
||||
],
|
||||
"messages": [
|
||||
"multimediaviewer-view-expanded",
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
*/
|
||||
|
||||
( function () {
|
||||
var MMVP,
|
||||
comingFromHashChange = false;
|
||||
var router = require( 'mediawiki.router' );
|
||||
var comingFromHashChange = false;
|
||||
var MMVP;
|
||||
|
||||
/**
|
||||
* Analyses the page, looks for image content and sets up the hooks
|
||||
|
@ -83,7 +84,7 @@
|
|||
/**
|
||||
* @property {OO.Router} router
|
||||
*/
|
||||
this.router = new OO.Router();
|
||||
this.router = router;
|
||||
this.setupRouter();
|
||||
comingFromHashChange = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue