fix load on IE and Firefox 3.6
This commit is contained in:
parent
bda90f6b6b
commit
762d5ca963
2 changed files with 3 additions and 2 deletions
2
index.js
2
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) {
|
||||
|
|
|
@ -322,11 +322,12 @@ Ox.documentReady <function> 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) {
|
||||
|
|
Loading…
Reference in a new issue