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) {