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 f5d19919a..2b51b0aca 100644 --- a/resources/mmv.bootstrap/mmv.bootstrap.js +++ b/resources/mmv.bootstrap/mmv.bootstrap.js @@ -92,7 +92,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; } @@ -535,7 +534,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 2c056ed04..62b181218 100644 --- a/tests/qunit/mmv/mmv.bootstrap.test.js +++ b/tests/qunit/mmv/mmv.bootstrap.test.js @@ -396,14 +396,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';