forked from 0x2620/oxjs
don't fail when offline
This commit is contained in:
parent
07cb483f02
commit
2a63f42b02
2 changed files with 5 additions and 7 deletions
10
index.js
10
index.js
|
|
@ -308,7 +308,7 @@ Ox.load(function() {
|
|||
size: [
|
||||
/\{size\.(\w+)\}/g,
|
||||
function(match, key) {
|
||||
return app.data.downloads ? ' (' + Ox.formatValue(
|
||||
return app.data.downloads.size ? ' (' + Ox.formatValue(
|
||||
app.data.downloads.size[key], 'B'
|
||||
) + ')' : '';
|
||||
}
|
||||
|
|
@ -319,11 +319,9 @@ Ox.load(function() {
|
|||
var version = app.data.downloads.version,
|
||||
current = 'You\'re currently running version '
|
||||
+ Ox.VERSION + '.',
|
||||
latest = 'The latest version is ' + version + ' ('
|
||||
+ app.data.downloads.date
|
||||
.replace('T', ' ')
|
||||
.replace('Z', ' UTC')
|
||||
+ ').';
|
||||
latest = version ? 'The latest version is ' + version
|
||||
+ ' (' + app.data.downloads.date.slice(0, 10)
|
||||
+ ').' : '';
|
||||
return version ? latest + (
|
||||
/:\/\/oxjs.org\//.test(window.location.href) ? ''
|
||||
: version == Ox.VERSION ? ' You\'re up to date.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue