mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
fix 4 lint errors
This commit is contained in:
parent
e11cad884c
commit
e1146b64ad
1 changed files with 4 additions and 4 deletions
|
@ -31,19 +31,19 @@ function getPdf(arg, callback) {
|
||||||
params = { url: arg };
|
params = { url: arg };
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
xhr.open('GET', params.url);
|
xhr.open('GET', params.url);
|
||||||
|
|
||||||
var headers = params.headers;
|
var headers = params.headers;
|
||||||
if (headers) {
|
if (headers) {
|
||||||
for (var property in headers) {
|
for (var property in headers) {
|
||||||
if (typeof headers[property] === 'undefined')
|
if (typeof headers[property] === 'undefined')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
xhr.setRequestHeader(property, params.headers[property]);
|
xhr.setRequestHeader(property, params.headers[property]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xhr.mozResponseType = xhr.responseType = 'arraybuffer';
|
xhr.mozResponseType = xhr.responseType = 'arraybuffer';
|
||||||
var protocol = params.url.indexOf(':') < 0 ? window.location.protocol :
|
var protocol = params.url.indexOf(':') < 0 ? window.location.protocol :
|
||||||
params.url.substring(0, params.url.indexOf(':') + 1);
|
params.url.substring(0, params.url.indexOf(':') + 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue