From b51e08a3aa92298d7654d0f1ca26b6dfd0316ab1 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Tue, 2 Apr 2013 17:05:16 +0200 Subject: [PATCH] Dropped window in favor of var to increase readability, usability and prevent IE8 from crashing. --- js/h5p.js | 4 ++-- js/jquery.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/h5p.js b/js/h5p.js index ec21e24..103bc72 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1,4 +1,4 @@ -window.H5P = window.H5P || {}; +var H5P = H5P || {}; // // Initialize H5P content @@ -36,7 +36,7 @@ H5P.Coords = function(x, y, w, h) { this.w = 1; this.h = 1; - if (typeof(x) == 'object') { + if (typeof(x) === 'object') { this.x = x.x; this.y = x.y; this.w = x.w; diff --git a/js/jquery.js b/js/jquery.js index 1137084..c126ed7 100644 --- a/js/jquery.js +++ b/js/jquery.js @@ -6,5 +6,5 @@ return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,a // Snap this specific version of jQuery into H5P. jQuery.noConflict will // revert the globals to what they were before this file was loaded. -window.H5P = window.H5P || {}; +var H5P = H5P || {}; H5P.jQuery = jQuery.noConflict(true);