mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-28 01:50:09 +00:00
Merge "Disable IE < 9"
This commit is contained in:
commit
6858c41fa6
|
@ -689,6 +689,10 @@ call_user_func( function() {
|
|||
'mmv.head.js',
|
||||
),
|
||||
|
||||
'dependencies' => array(
|
||||
'mmv.base',
|
||||
),
|
||||
|
||||
'position' => 'top',
|
||||
), $moduleInfo( 'mmv' ) );
|
||||
|
||||
|
|
|
@ -15,8 +15,13 @@
|
|||
* along with MultimediaViewer. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// This will just set up the MultimediaViewer namespace.
|
||||
// Included on every page which has images so keep it lightweight.
|
||||
( function ( mw ) {
|
||||
mw.mmv = {};
|
||||
}( mediaWiki ) );
|
||||
( function ( mw, $ ) {
|
||||
mw.mmv = {
|
||||
// We have to disable support for IE < 9 until this is fixed: https://bugzilla.wikimedia.org/show_bug.cgi?id=63303
|
||||
// This can't be done with feature detection, as the error IE triggers in that situation can't be caught
|
||||
isBrowserSupported : function () {
|
||||
return ! ( $.browser.msie && parseFloat( $.browser.version ) < 9 );
|
||||
}
|
||||
};
|
||||
}( mediaWiki, jQuery ) );
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
// This file is used to do the global initialization that we want on the real pages,
|
||||
// but do not want in the tests.
|
||||
( function ( mw, $ ) {
|
||||
if ( ! mw.mmv.isBrowserSupported() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var bootstrap = new mw.mmv.MultimediaViewerBootstrap();
|
||||
|
||||
$( document ).ready( function () {
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
( function ( mw, $ ) {
|
||||
var $document = $( document );
|
||||
|
||||
if ( ! mw.mmv.isBrowserSupported() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the user disabled MediaViewer in his preferences, we do not set up click handling.
|
||||
// This is loaded before user JS so we cannot check wgMediaViewer.
|
||||
if ( mw.config.get( 'wgMediaViewerOnClick' ) !== true ) {
|
||||
|
|
Loading…
Reference in a new issue