Updated libs. Updates to content. More images
parent
57674be19d
commit
784d5caeb3
32
js/h5p.js
32
js/h5p.js
|
@ -53,7 +53,7 @@ H5P.Coords = function(x, y, w, h) {
|
||||||
}
|
}
|
||||||
if (h !== undefined) {
|
if (h !== undefined) {
|
||||||
this.h = h;
|
this.h = h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
@ -64,25 +64,25 @@ Array.prototype.shuffle = function() {
|
||||||
var i = this.length, j, tempi, tempj;
|
var i = this.length, j, tempi, tempj;
|
||||||
if ( i === 0 ) return false;
|
if ( i === 0 ) return false;
|
||||||
while ( --i ) {
|
while ( --i ) {
|
||||||
j = Math.floor( Math.random() * ( i + 1 ) );
|
j = Math.floor( Math.random() * ( i + 1 ) );
|
||||||
tempi = this[i];
|
tempi = this[i];
|
||||||
tempj = this[j];
|
tempj = this[j];
|
||||||
this[i] = tempj;
|
this[i] = tempj;
|
||||||
this[j] = tempi;
|
this[j] = tempi;
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add indexOf to browsers that lack them. (IEs)
|
// Add indexOf to browsers that lack them. (IEs)
|
||||||
if(!Array.prototype.indexOf) {
|
if(!Array.prototype.indexOf) {
|
||||||
Array.prototype.indexOf = function(needle) {
|
Array.prototype.indexOf = function(needle) {
|
||||||
for(var i = 0; i < this.length; i++) {
|
for(var i = 0; i < this.length; i++) {
|
||||||
if(this[i] === needle) {
|
if(this[i] === needle) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simple 'contains' function. Easier to use than keep testing indexOf to -1.
|
// Simple 'contains' function. Easier to use than keep testing indexOf to -1.
|
||||||
|
@ -92,9 +92,9 @@ Array.prototype.contains = function (needle) {
|
||||||
|
|
||||||
// We want our own jQuery version, regardless of what the containing page is
|
// We want our own jQuery version, regardless of what the containing page is
|
||||||
// up to.
|
// up to.
|
||||||
|
// TODO: Does not work properly in <IE10
|
||||||
(function () {
|
(function () {
|
||||||
document.writeln('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>');
|
document.writeln('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>');
|
||||||
document.writeln('<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>');
|
document.writeln('<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>');
|
||||||
document.writeln('<script>H5P.jQuery = jQuery.noConflict(); H5P.jQuery(document).ready(function(){H5P.init();});</script>');
|
document.writeln('<script>H5P.jQuery = jQuery.noConflict(true); H5P.jQuery(document).ready(function(){H5P.init();});</script>');
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue