Updated libs. Updates to content. More images

namespaces
Frank Ronny Larsen 2013-01-25 14:38:12 +01:00
parent 57674be19d
commit 784d5caeb3
1 changed files with 16 additions and 16 deletions

View File

@ -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>');
})(); })();