From 762d5ca9631fc93f396b763e553515e912e948f4 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 5 Jul 2012 19:05:52 +0200 Subject: [PATCH] fix load on IE and Firefox 3.6 --- index.js | 2 +- source/Ox/js/DOM.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ac5ccc3d..fb6ee506 100644 --- a/index.js +++ b/index.js @@ -240,7 +240,7 @@ Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test( }, loadData: function(callback) { var q = '?' + Ox.random(1000000), - url = 'https://oxjs.org/downloads/downloads.json' + q; + url = '//oxjs.org/downloads/downloads.json' + q; Ox.getJSON('index.json' + q, function(data) { app.data = Ox.extend(app.data, data); app.data.pages.forEach(function(page) { diff --git a/source/Ox/js/DOM.js b/source/Ox/js/DOM.js index 55d48a19..bb0efb18 100644 --- a/source/Ox/js/DOM.js +++ b/source/Ox/js/DOM.js @@ -322,11 +322,12 @@ Ox.documentReady Calls a callback function once the DOM is ready @*/ Ox.documentReady = (function() { var callbacks = []; - document.onreadystatechange = function() { + document.onreadystatechange = window.onload = function() { if (document.readyState == 'complete') { callbacks.forEach(function(callback) { callback(); }); + document.onreadystatechange = window.onload = null; } }; return function(callback) {