1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

trim bower libs

This commit is contained in:
Luke Pulverenti 2016-07-09 17:04:54 -04:00
parent ce68029f25
commit 909258464f
98 changed files with 128 additions and 28399 deletions

View file

@ -1,4 +1,4 @@
(function() {
(function(self) {
'use strict';
if (self.fetch) {
@ -110,7 +110,7 @@
var support = {
blob: 'FileReader' in self && 'Blob' in self && (function() {
try {
new Blob();
new Blob()
return true
} catch(e) {
return false
@ -140,6 +140,14 @@
} else {
throw new Error('unsupported BodyInit type')
}
if (!this.headers.get('content-type')) {
if (typeof body === 'string') {
this.headers.set('content-type', 'text/plain;charset=UTF-8')
} else if (this._bodyBlob && this._bodyBlob.type) {
this.headers.set('content-type', this._bodyBlob.type)
}
}
}
if (support.blob) {
@ -259,7 +267,7 @@
function headers(xhr) {
var head = new Headers()
var pairs = xhr.getAllResponseHeaders().trim().split('\n')
var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
pairs.forEach(function(header) {
var split = header.trim().split(':')
var key = split.shift().trim()
@ -276,13 +284,13 @@
options = {}
}
this._initBody(bodyInit)
this.type = 'default'
this.status = options.status
this.ok = this.status >= 200 && this.status < 300
this.statusText = options.statusText
this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
this.url = options.url || ''
this._initBody(bodyInit)
}
Body.call(Response.prototype)
@ -312,9 +320,9 @@
return new Response(null, {status: status, headers: {location: url}})
}
self.Headers = Headers;
self.Request = Request;
self.Response = Response;
self.Headers = Headers
self.Request = Request
self.Response = Response
self.fetch = function(input, init) {
return new Promise(function(resolve, reject) {
@ -337,7 +345,7 @@
return xhr.getResponseHeader('X-Request-URL')
}
return;
return
}
xhr.onload = function() {
@ -352,7 +360,7 @@
headers: headers(xhr),
url: responseURL()
}
var body = 'response' in xhr ? xhr.response : xhr.responseText;
var body = 'response' in xhr ? xhr.response : xhr.responseText
resolve(new Response(body, options))
}
@ -360,6 +368,10 @@
reject(new TypeError('Network request failed'))
}
xhr.ontimeout = function() {
reject(new TypeError('Network request failed'))
}
xhr.open(request.method, request.url, true)
if (request.credentials === 'include') {
@ -378,4 +390,4 @@
})
}
self.fetch.polyfill = true
})();
})(typeof self !== 'undefined' ? self : this);