| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
const Config = require( './mmv.Config.js' ); |
| 19 |
const LightboxImage = require( './mmv.lightboximage.js' ); |
| 20 |
const { extensions } = require( './config.json' ); |
| 21 |
const mwRouter = require( 'mediawiki.router' ); |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
const MANAGED_STATE = 'MMV was here!'; |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
class MultimediaViewerBootstrap { |
| 33 |
constructor() { |
| 34 |
|
| 35 |
this.hoverWaitDuration = 200; |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
this.viewerIsBroken = false; |
| 43 |
|
| 44 |
this.thumbsReadyDeferred = $.Deferred(); |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
this.thumbs = []; |
| 49 |
this.$thumbs = null; |
| 50 |
this.$parsoidThumbs = null; |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
mw.hook( 'wikipage.content' ).add( this.processThumbs.bind( this ) ); |
| 56 |
|
| 57 |
|
| 58 |
this.setupRouter( mwRouter ); |
| 59 |
} |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
route( fileName ) { |
| 67 |
this.loadViewer( true ).then( ( viewer ) => { |
| 68 |
let fileTitle; |
| 69 |
viewer.comingFromHashChange = true; |
| 70 |
try { |
| 71 |
let position = fileName.match( Config.POSITION_REGEXP ); |
| 72 |
if ( position ) { |
| 73 |
position = +position[ 1 ]; |
| 74 |
fileName = fileName.replace( Config.POSITION_REGEXP, '' ); |
| 75 |
} else { |
| 76 |
position = undefined; |
| 77 |
} |
| 78 |
fileName = decodeURIComponent( fileName ); |
| 79 |
fileTitle = new mw.Title( fileName ); |
| 80 |
viewer.loadImageByTitle( fileTitle, position ); |
| 81 |
} catch ( err ) { |
| 82 |
|
| 83 |
mw.log.warn( err ); |
| 84 |
} |
| 85 |
} ); |
| 86 |
} |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
setupRouter( router ) { |
| 94 |
router.addRoute( Config.ROUTE_REGEXP, this.route.bind( this ) ); |
| 95 |
router.addRoute( Config.LEGACY_ROUTE_REGEXP, this.route.bind( this ) ); |
| 96 |
this.router = router; |
| 97 |
} |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
loadViewer( setupOverlay ) { |
| 106 |
const deferred = $.Deferred(); |
| 107 |
let viewer; |
| 108 |
let message; |
| 109 |
|
| 110 |
|
| 111 |
if ( mw.config.get( 'wgMediaViewer' ) !== true ) { |
| 112 |
return deferred.reject(); |
| 113 |
} |
| 114 |
|
| 115 |
if ( history.scrollRestoration ) { |
| 116 |
history.scrollRestoration = 'manual'; |
| 117 |
} |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
if ( setupOverlay ) { |
| 125 |
this.setupOverlay(); |
| 126 |
} |
| 127 |
|
| 128 |
mw.loader.using( 'mmv', ( req ) => { |
| 129 |
try { |
| 130 |
viewer = this.getViewer( req ); |
| 131 |
} catch ( e ) { |
| 132 |
message = e.message; |
| 133 |
if ( e.stack ) { |
| 134 |
message += `\n${ e.stack }`; |
| 135 |
} |
| 136 |
deferred.reject( message ); |
| 137 |
return; |
| 138 |
} |
| 139 |
deferred.resolve( viewer ); |
| 140 |
}, ( error ) => { |
| 141 |
deferred.reject( error.message ); |
| 142 |
} ); |
| 143 |
|
| 144 |
return deferred.promise() |
| 145 |
.then( |
| 146 |
( viewer2 ) => { |
| 147 |
if ( !this.viewerInitialized ) { |
| 148 |
if ( this.thumbs.length ) { |
| 149 |
viewer2.initWithThumbs( this.thumbs ); |
| 150 |
} |
| 151 |
|
| 152 |
this.viewerInitialized = true; |
| 153 |
} |
| 154 |
return viewer2; |
| 155 |
}, |
| 156 |
( message2 ) => { |
| 157 |
mw.log.warn( message2 ); |
| 158 |
this.cleanupOverlay(); |
| 159 |
this.viewerIsBroken = true; |
| 160 |
mw.notify( `Error loading MediaViewer: ${ message2 }` ); |
| 161 |
return $.Deferred().reject( message2 ); |
| 162 |
} |
| 163 |
).always( () => { |
| 164 |
if ( this.$loadBar ) { |
| 165 |
this.$loadBar.remove(); |
| 166 |
} |
| 167 |
} ); |
| 168 |
} |
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
processThumbs( $content ) { |
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
this.viewerInitialized = false; |
| 184 |
|
| 185 |
this.$parsoidThumbs = $content.find( |
| 186 |
'[typeof*="mw:File"] a.mw-file-description img, ' + |
| 187 |
|
| 188 |
|
| 189 |
'[typeof*="mw:Image"] a.mw-file-description img' |
| 190 |
); |
| 191 |
|
| 192 |
this.$thumbs = $content |
| 193 |
.find( |
| 194 |
'.gallery .image img, ' + |
| 195 |
'a.image img, ' + |
| 196 |
'a.mw-file-description img, ' + |
| 197 |
'#file a img' |
| 198 |
) |
| 199 |
|
| 200 |
.not( this.$parsoidThumbs ); |
| 201 |
|
| 202 |
try { |
| 203 |
this.$thumbs.each( ( i, thumb ) => this.processThumb( thumb ) ); |
| 204 |
this.$parsoidThumbs.each( ( i, thumb ) => this.processParsoidThumb( thumb ) ); |
| 205 |
} finally { |
| 206 |
this.thumbsReadyDeferred.resolve(); |
| 207 |
} |
| 208 |
} |
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
isAllowedThumb( $thumb ) { |
| 217 |
const selectors = [ |
| 218 |
'.metadata', |
| 219 |
'.noviewer', |
| 220 |
'.noarticletext', |
| 221 |
'#siteNotice', |
| 222 |
'ul.mw-gallery-slideshow li.gallerybox' |
| 223 |
]; |
| 224 |
return $thumb.closest( selectors.join( ', ' ) ).length === 0; |
| 225 |
|
| 226 |
} |
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
isValidExtension( title ) { |
| 233 |
return title && title.getExtension() && ( title.getExtension().toLowerCase() in extensions ); |
| 234 |
} |
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
preloadAssets( $thumbContainer ) { |
| 243 |
$thumbContainer.on( { |
| 244 |
mouseenter: () => { |
| 245 |
|
| 246 |
if ( !Config.isMediaViewerEnabledOnClick() ) { |
| 247 |
return; |
| 248 |
} |
| 249 |
this.preloadOnHoverTimer = setTimeout( () => { |
| 250 |
mw.loader.load( 'mmv' ); |
| 251 |
}, this.hoverWaitDuration ); |
| 252 |
}, |
| 253 |
mouseleave: () => { |
| 254 |
if ( this.preloadOnHoverTimer ) { |
| 255 |
clearTimeout( this.preloadOnHoverTimer ); |
| 256 |
} |
| 257 |
} |
| 258 |
} ); |
| 259 |
} |
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
processThumb( thumb ) { |
| 267 |
let title; |
| 268 |
const $thumb = $( thumb ); |
| 269 |
const $link = $thumb.closest( 'a.image, a.mw-file-description' ); |
| 270 |
const $thumbContainer = $link.closest( '.thumb' ); |
| 271 |
const $enlarge = $thumbContainer.find( '.magnify a' ); |
| 272 |
const isFilePageMainThumb = $thumb.closest( '#file' ).length > 0; |
| 273 |
|
| 274 |
if ( isFilePageMainThumb ) { |
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
title = mw.Title.newFromText( mw.config.get( 'wgTitle' ), mw.config.get( 'wgNamespaceNumber' ) ); |
| 280 |
} else { |
| 281 |
title = mw.Title.newFromImg( $thumb ); |
| 282 |
} |
| 283 |
|
| 284 |
if ( !this.isValidExtension( title ) ) { |
| 285 |
|
| 286 |
|
| 287 |
return; |
| 288 |
} |
| 289 |
|
| 290 |
if ( !this.isAllowedThumb( $thumb ) ) { |
| 291 |
return; |
| 292 |
} |
| 293 |
|
| 294 |
if ( $thumbContainer.length ) { |
| 295 |
this.preloadAssets( $thumbContainer ); |
| 296 |
} |
| 297 |
|
| 298 |
if ( isFilePageMainThumb ) { |
| 299 |
this.processFilePageThumb( $thumb, title ); |
| 300 |
return; |
| 301 |
} |
| 302 |
|
| 303 |
|
| 304 |
const image = new LightboxImage( |
| 305 |
$thumb.prop( 'src' ), |
| 306 |
title, |
| 307 |
this.thumbs.length, |
| 308 |
this.thumbs.filter( ( t ) => t.filePageTitle.getPrefixedText() === title.getPrefixedText() ).length + 1, |
| 309 |
$thumb[ 0 ], |
| 310 |
this.findCaption( $thumbContainer, $link ) |
| 311 |
); |
| 312 |
this.thumbs.push( image ); |
| 313 |
|
| 314 |
$link.add( $enlarge ).on( 'click', ( e ) => this.click( e, image ) ); |
| 315 |
} |
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
processParsoidThumb( thumb ) { |
| 324 |
const $thumb = $( thumb ); |
| 325 |
const $link = $thumb.closest( 'a.mw-file-description' ); |
| 326 |
const $thumbContainer = $link.closest( |
| 327 |
'[typeof*="mw:File"], ' + |
| 328 |
|
| 329 |
|
| 330 |
'[typeof*="mw:Image"]' |
| 331 |
); |
| 332 |
const title = mw.Title.newFromImg( $thumb ); |
| 333 |
let caption; |
| 334 |
|
| 335 |
if ( !this.isValidExtension( title ) ) { |
| 336 |
|
| 337 |
|
| 338 |
return; |
| 339 |
} |
| 340 |
|
| 341 |
if ( !this.isAllowedThumb( $thumb ) ) { |
| 342 |
return; |
| 343 |
} |
| 344 |
|
| 345 |
if ( $thumbContainer.length ) { |
| 346 |
this.preloadAssets( $thumbContainer ); |
| 347 |
} |
| 348 |
|
| 349 |
if ( ( $thumbContainer.prop( 'tagName' ) || '' ).toLowerCase() === 'figure' ) { |
| 350 |
caption = $thumbContainer.find( 'figcaption' ).html() || ''; |
| 351 |
} else { |
| 352 |
caption = $link.prop( 'title' ) || undefined; |
| 353 |
} |
| 354 |
|
| 355 |
|
| 356 |
const image = new LightboxImage( |
| 357 |
$thumb.prop( 'src' ), |
| 358 |
title, |
| 359 |
this.thumbs.length, |
| 360 |
this.thumbs.filter( ( t ) => t.filePageTitle.getPrefixedText() === title.getPrefixedText() ).length + 1, |
| 361 |
$thumb[ 0 ], |
| 362 |
caption |
| 363 |
); |
| 364 |
this.thumbs.push( image ); |
| 365 |
|
| 366 |
$link.on( 'click', ( e ) => this.click( e, image ) ); |
| 367 |
} |
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
processFilePageThumb( $thumb, title ) { |
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
$( '.mw-mmv-view-expanded' ).remove(); |
| 381 |
|
| 382 |
const $mmvButton = $( '<button>' ) |
| 383 |
.addClass( 'mw-mmv-view-expanded cdx-button' ) |
| 384 |
.append( $( '<span>' ).addClass( 'cdx-button__icon' ) ) |
| 385 |
.append( ' ' ) |
| 386 |
.append( mw.message( 'multimediaviewer-view-expanded' ).escaped() ); |
| 387 |
|
| 388 |
|
| 389 |
$( '.fullMedia' ).append( $mmvButton ); |
| 390 |
|
| 391 |
const image = new LightboxImage( |
| 392 |
$thumb.prop( 'src' ), |
| 393 |
title, |
| 394 |
this.thumbs.length, |
| 395 |
1, |
| 396 |
$thumb[ 0 ], |
| 397 |
'' |
| 398 |
); |
| 399 |
this.thumbs.push( image ); |
| 400 |
|
| 401 |
$mmvButton.on( 'click', () => this.openImage( image ) ); |
| 402 |
|
| 403 |
if ( Config.shouldShowStatusInfo() ) { |
| 404 |
Config.disableStatusInfo(); |
| 405 |
this.showStatusInfo(); |
| 406 |
} |
| 407 |
} |
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
showStatusInfo() { |
| 413 |
mw.loader.using( 'oojs-ui-core' ).done( () => { |
| 414 |
const content = document.createElement( 'div' ); |
| 415 |
content.textContent = mw.msg( 'multimediaviewer-disable-info' ); |
| 416 |
|
| 417 |
const popupWidget = new OO.ui.PopupWidget( { |
| 418 |
label: mw.msg( 'multimediaviewer-disable-info-title' ), |
| 419 |
$content: $( content ), |
| 420 |
padded: true, |
| 421 |
head: true, |
| 422 |
anchor: true, |
| 423 |
align: 'center', |
| 424 |
position: 'above', |
| 425 |
autoFlip: false, |
| 426 |
horizontalPosition: 'start', |
| 427 |
|
| 428 |
$floatableContainer: $( '.mw-mmv-view-expanded' ) |
| 429 |
} ); |
| 430 |
popupWidget.$element.appendTo( document.body ); |
| 431 |
popupWidget.toggleClipping( true ); |
| 432 |
popupWidget.toggle( true ); |
| 433 |
} ); |
| 434 |
} |
| 435 |
|
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
findCaption( $thumbContainer, $link ) { |
| 444 |
if ( !$thumbContainer.length ) { |
| 445 |
return $link.prop( 'title' ) || undefined; |
| 446 |
} |
| 447 |
|
| 448 |
let $thumbCaption = $thumbContainer.find( '.thumbcaption' ); |
| 449 |
if ( $thumbCaption.length > 1 ) { |
| 450 |
|
| 451 |
|
| 452 |
$thumbCaption = $link.closest( ':has(> .thumbcaption)', $thumbContainer ) |
| 453 |
.find( '> .thumbcaption' ); |
| 454 |
} |
| 455 |
|
| 456 |
if ( !$thumbCaption.length ) { |
| 457 |
$thumbCaption = $thumbContainer |
| 458 |
.closest( '.gallerybox' ) |
| 459 |
.not( |
| 460 |
|
| 461 |
() => $thumbContainer.closest( '#mw-category-media' ).length |
| 462 |
) |
| 463 |
.not( () => { |
| 464 |
|
| 465 |
const $specialFileRelatedPages = $( |
| 466 |
'.page-Special_NewFiles, ' + |
| 467 |
'.page-Special_MostLinkedFiles,' + |
| 468 |
'.page-Special_MostGloballyLinkedFiles, ' + |
| 469 |
'.page-Special_UncategorizedFiles, ' + |
| 470 |
'.page-Special_UnusedFiles' |
| 471 |
); |
| 472 |
return $thumbContainer.closest( $specialFileRelatedPages ).length; |
| 473 |
} ) |
| 474 |
.find( '.gallerytext' ); |
| 475 |
} |
| 476 |
|
| 477 |
if ( $thumbCaption.find( '.magnify' ).length ) { |
| 478 |
$thumbCaption = $thumbCaption.clone(); |
| 479 |
$thumbCaption.find( '.magnify' ).remove(); |
| 480 |
} |
| 481 |
|
| 482 |
return $thumbCaption.html() || ''; |
| 483 |
} |
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
openImage( image ) { |
| 491 |
this.ensureEventHandlersAreSetUp(); |
| 492 |
const hash = Config.getMediaHash( image.filePageTitle, image.position ); |
| 493 |
location.hash = hash; |
| 494 |
history.replaceState( MANAGED_STATE, null, hash ); |
| 495 |
} |
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
click( e, image ) { |
| 506 |
|
| 507 |
if ( ( e.button !== 0 && e.which !== 1 ) || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey ) { |
| 508 |
return true; |
| 509 |
} |
| 510 |
|
| 511 |
|
| 512 |
if ( !Config.isMediaViewerEnabledOnClick() ) { |
| 513 |
return true; |
| 514 |
} |
| 515 |
|
| 516 |
|
| 517 |
if ( this.viewerIsBroken ) { |
| 518 |
return true; |
| 519 |
} |
| 520 |
|
| 521 |
|
| 522 |
this.openImage( image ); |
| 523 |
|
| 524 |
|
| 525 |
e.preventDefault(); |
| 526 |
|
| 527 |
return false; |
| 528 |
} |
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
isViewerHash() { |
| 537 |
const path = location.hash.slice( 1 ); |
| 538 |
return path.match( Config.ROUTE_REGEXP ) || path.match( Config.LEGACY_ROUTE_REGEXP ); |
| 539 |
} |
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
hash() { |
| 545 |
const isViewerHash = this.isViewerHash(); |
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
if ( !this.viewerInitialized && !isViewerHash ) { |
| 550 |
return; |
| 551 |
} |
| 552 |
|
| 553 |
const hash = location.hash; |
| 554 |
if ( window.history.state !== MANAGED_STATE ) { |
| 555 |
|
| 556 |
history.replaceState( null, null, '#' ); |
| 557 |
history.pushState( MANAGED_STATE, null, hash ); |
| 558 |
} |
| 559 |
this.router.checkRoute(); |
| 560 |
} |
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
getViewer( localRequire ) { |
| 569 |
if ( this.viewer === undefined ) { |
| 570 |
const { MultimediaViewer } = localRequire( 'mmv' ); |
| 571 |
this.viewer = new MultimediaViewer(); |
| 572 |
this.viewer.setupEventHandlers(); |
| 573 |
} |
| 574 |
|
| 575 |
return this.viewer; |
| 576 |
} |
| 577 |
|
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
setupEventHandlers() { |
| 582 |
|
| 583 |
this.eventHandlersHaveBeenSetUp = true; |
| 584 |
|
| 585 |
|
| 586 |
this.hash( true ); |
| 587 |
|
| 588 |
$( document ).on( 'mmv-setup-overlay', () => { |
| 589 |
this.setupOverlay(); |
| 590 |
} ).on( 'mmv-cleanup-overlay', () => { |
| 591 |
this.cleanupOverlay(); |
| 592 |
} ); |
| 593 |
} |
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
cleanupEventHandlers() { |
| 599 |
$( document ).off( 'mmv-setup-overlay mmv-cleanup-overlay' ); |
| 600 |
this.eventHandlersHaveBeenSetUp = false; |
| 601 |
} |
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
ensureEventHandlersAreSetUp() { |
| 609 |
if ( !this.eventHandlersHaveBeenSetUp ) { |
| 610 |
this.setupEventHandlers(); |
| 611 |
} |
| 612 |
} |
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
setupOverlay() { |
| 618 |
const $body = $( document.body ); |
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
if ( $body.hasClass( 'mw-mmv-lightbox-open' ) ) { |
| 623 |
return; |
| 624 |
} |
| 625 |
|
| 626 |
if ( !this.$overlay ) { |
| 627 |
this.$overlay = $( '<div>' ) |
| 628 |
|
| 629 |
.addClass( 'mw-mmv-overlay mw-no-invert' ); |
| 630 |
|
| 631 |
this.$loadBar = $( '<div>' ) |
| 632 |
.addClass( 'cdx-progress-bar' ) |
| 633 |
.attr( { |
| 634 |
role: 'progressbar', |
| 635 |
'aria-label': mw.msg( 'multimediaviewer-loading' ) |
| 636 |
} ).append( $( '<div>' ).addClass( 'cdx-progress-bar__bar' ) ); |
| 637 |
this.$overlay.append( this.$loadBar ); |
| 638 |
} |
| 639 |
|
| 640 |
this.savedScrollTop = $( window ).scrollTop(); |
| 641 |
|
| 642 |
$body.addClass( 'mw-mmv-lightbox-open' ) |
| 643 |
.append( this.$overlay ); |
| 644 |
} |
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
cleanupOverlay() { |
| 650 |
$( document.body ).removeClass( 'mw-mmv-lightbox-open' ); |
| 651 |
|
| 652 |
if ( this.$overlay ) { |
| 653 |
this.$overlay.remove(); |
| 654 |
} |
| 655 |
|
| 656 |
if ( this.savedScrollTop !== undefined ) { |
| 657 |
|
| 658 |
setTimeout( () => { |
| 659 |
$( window ).scrollTop( this.savedScrollTop ); |
| 660 |
this.savedScrollTop = undefined; |
| 661 |
} ); |
| 662 |
} |
| 663 |
} |
| 664 |
|
| 665 |
whenThumbsReady() { |
| 666 |
return this.thumbsReadyDeferred.promise(); |
| 667 |
} |
| 668 |
} |
| 669 |
|
| 670 |
module.exports = MultimediaViewerBootstrap; |