diff --git a/resources/mmv.bootstrap/mmv.Config.js b/resources/mmv.bootstrap/mmv.Config.js index cebfd40fe..023f3d6cd 100644 --- a/resources/mmv.bootstrap/mmv.Config.js +++ b/resources/mmv.bootstrap/mmv.Config.js @@ -49,15 +49,6 @@ class Config { return /\/(\d+)$/; } - /** - * Regular expression representing the legacy media route - * - * @return {RegExp} - */ - static get LEGACY_ROUTE_REGEXP() { - return /^mediaviewer\/(.+)$/; - } - /** * Returns true if MediaViewer should handle thumbnail clicks. * diff --git a/resources/mmv.bootstrap/mmv.bootstrap.js b/resources/mmv.bootstrap/mmv.bootstrap.js index d247da603..577f6804f 100644 --- a/resources/mmv.bootstrap/mmv.bootstrap.js +++ b/resources/mmv.bootstrap/mmv.bootstrap.js @@ -93,7 +93,6 @@ class MultimediaViewerBootstrap { */ setupRouter( router ) { router.addRoute( Config.ROUTE_REGEXP, this.route.bind( this ) ); - router.addRoute( Config.LEGACY_ROUTE_REGEXP, this.route.bind( this ) ); this.router = router; } @@ -549,7 +548,7 @@ class MultimediaViewerBootstrap { */ isViewerHash() { const path = location.hash.slice( 1 ); - return path.match( Config.ROUTE_REGEXP ) || path.match( Config.LEGACY_ROUTE_REGEXP ); + return path.match( Config.ROUTE_REGEXP ); } /** diff --git a/tests/qunit/mmv/mmv.bootstrap.test.js b/tests/qunit/mmv/mmv.bootstrap.test.js index 432e16735..0b10777c4 100644 --- a/tests/qunit/mmv/mmv.bootstrap.test.js +++ b/tests/qunit/mmv/mmv.bootstrap.test.js @@ -399,14 +399,6 @@ const { asyncMethod, waitForAsync, getMultimediaViewer } = require( './mmv.testh return hashTest( '/media', bootstrap, assert ); } ); - QUnit.test( 'Load the viewer on a legacy hash', ( assert ) => { - location.hash = ''; - - const bootstrap = createBootstrap(); - - return hashTest( 'mediaviewer', bootstrap, assert ); - } ); - QUnit.test( 'Overlay is set up on hash change', function ( assert ) { location.hash = '#/media/foo';