fix 'is oxjs.org' regexp and conditionally switch to build/ version
This commit is contained in:
parent
80e0a02ea3
commit
0ececcff87
1 changed files with 8 additions and 4 deletions
12
index.js
12
index.js
|
@ -27,7 +27,9 @@ window.onerror = function(error, url) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Ox.load(function() {
|
Ox.load(/^https?:\/\/(www\.)?oxjs\.org\//.test(
|
||||||
|
window.location.href
|
||||||
|
), function() {
|
||||||
var app = window.oxjs = {
|
var app = window.oxjs = {
|
||||||
$ui: {},
|
$ui: {},
|
||||||
animate: function() {
|
animate: function() {
|
||||||
|
@ -329,9 +331,11 @@ Ox.load(function() {
|
||||||
+ ' (' + app.data.downloads.date.slice(0, 10)
|
+ ' (' + app.data.downloads.date.slice(0, 10)
|
||||||
+ ').' : '';
|
+ ').' : '';
|
||||||
return version ? latest + (
|
return version ? latest + (
|
||||||
/:\/\/oxjs.org\//.test(window.location.href) ? ''
|
/^https?:\/\/(www\.)?oxjs\.org\//.test(
|
||||||
: version == Ox.VERSION ? ' You\'re up to date.'
|
window.location.href
|
||||||
: ' ' + current
|
) ? ''
|
||||||
|
: version == Ox.VERSION ? ' You\'re up to date.'
|
||||||
|
: ' ' + current
|
||||||
) : current;
|
) : current;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue