fix 'is oxjs.org' regexp and conditionally switch to build/ version

This commit is contained in:
rolux 2012-06-26 19:19:43 +02:00
parent 80e0a02ea3
commit 0ececcff87

View file

@ -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;
} }
] ]