From 0ececcff874666f8fdf68aef48336832468a5859 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 26 Jun 2012 19:19:43 +0200 Subject: [PATCH] fix 'is oxjs.org' regexp and conditionally switch to build/ version --- index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index ddd8669b..e4f37d0c 100644 --- a/index.js +++ b/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 = { $ui: {}, animate: function() { @@ -329,9 +331,11 @@ Ox.load(function() { + ' (' + app.data.downloads.date.slice(0, 10) + ').' : ''; return version ? latest + ( - /:\/\/oxjs.org\//.test(window.location.href) ? '' - : version == Ox.VERSION ? ' You\'re up to date.' - : ' ' + current + /^https?:\/\/(www\.)?oxjs\.org\//.test( + window.location.href + ) ? '' + : version == Ox.VERSION ? ' You\'re up to date.' + : ' ' + current ) : current; } ]