Release v2.5

This commit is contained in:
Rasmus Andersson 2018-02-18 00:28:23 -08:00
parent c551b9f66a
commit 360916d1ec
67 changed files with 34493 additions and 33851 deletions

View file

@ -1,5 +1,30 @@
var isMac = false
// fetchjson(url string, cb (err Error, d Object)->nil)
//
var fetchjson = (
typeof window.fetch == 'function' ? (
function _fetchjson(url, cb) {
return window.fetch(url)
.then(function(r) { return r.json() })
.then(function(data) { cb(null, data) })
.catch(cb)
}
) :
function _fetchjson(url, cb) {
var r = new XMLHttpRequest()
r.addEventListener("load", function(){
try {
cb(null, JSON.parse(r.responseText))
} catch (err) {
cb(err)
}
})
r.open("GET", url)
r.send()
}
)
;(function(){
"use strict";