Skip to content

Commit

Permalink
replaced jQuery inArray with an array search compatiable with IE8
Browse files Browse the repository at this point in the history
  • Loading branch information
eitanavgil authored and amirch1 committed Sep 21, 2014
1 parent d5ff4de commit 1dcf667
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion includes/DefaultSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$wgBaseMwEmbedPath = realpath( dirname( __FILE__ ) . '/../' );

// The version of the library:
$wgMwEmbedVersion = '2.18.4';
$wgMwEmbedVersion = '2.18.4.1';

// Default HTTP protocol from GET or SERVER parameters
if( isset($_GET['protocol']) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,14 @@ kWidget.addReadyCallback( function( playerId ){
s.Media.trackWhilePlaying = true;
s.Media.trackMilestones="25,50,75";
s.Media.monitor = function ( s, media ) {
if ( $.inArray( media.event, trackEvents ) !== -1 ) {
var inArray = false;
for (var i = 0; i < trackEvents.length; i++){
if(media.event === trackEvents[i]){
inArray = true;
break;
}
}
if( inArray ) {
trackMediaWithExtraEvars();
}
if( media.event == 'CLOSE' ){
Expand Down

0 comments on commit 1dcf667

Please sign in to comment.