Fix errors reported by the comma-spacing
ESLint rule
http://eslint.org/docs/rules/comma-spacing
This commit is contained in:
parent
66d2637b3f
commit
ad915f8af1
@ -72,7 +72,7 @@ function getHeaderFromHeaders(headers, headerName) {
|
|||||||
function isPdfFile(details) {
|
function isPdfFile(details) {
|
||||||
var header = getHeaderFromHeaders(details.responseHeaders, 'content-type');
|
var header = getHeaderFromHeaders(details.responseHeaders, 'content-type');
|
||||||
if (header) {
|
if (header) {
|
||||||
var headerValue = header.value.toLowerCase().split(';',1)[0].trim();
|
var headerValue = header.value.toLowerCase().split(';', 1)[0].trim();
|
||||||
if (headerValue === 'application/pdf') {
|
if (headerValue === 'application/pdf') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ chrome.webRequest.onHeadersReceived.addListener(
|
|||||||
],
|
],
|
||||||
types: ['main_frame', 'sub_frame']
|
types: ['main_frame', 'sub_frame']
|
||||||
},
|
},
|
||||||
['blocking','responseHeaders']);
|
['blocking', 'responseHeaders']);
|
||||||
|
|
||||||
chrome.webRequest.onBeforeRequest.addListener(
|
chrome.webRequest.onBeforeRequest.addListener(
|
||||||
function onBeforeRequestForFTP(details) {
|
function onBeforeRequestForFTP(details) {
|
||||||
|
2
make.js
2
make.js
@ -883,7 +883,7 @@ target.chromium = function() {
|
|||||||
'extensions/chromium/*.html',
|
'extensions/chromium/*.html',
|
||||||
'extensions/chromium/*.js',
|
'extensions/chromium/*.js',
|
||||||
'extensions/chromium/*.css',
|
'extensions/chromium/*.css',
|
||||||
'extensions/chromium/icon*.png',],
|
'extensions/chromium/icon*.png'],
|
||||||
CHROME_BUILD_DIR],
|
CHROME_BUILD_DIR],
|
||||||
['extensions/chromium/pageAction/*.*', CHROME_BUILD_DIR + '/pageAction'],
|
['extensions/chromium/pageAction/*.*', CHROME_BUILD_DIR + '/pageAction'],
|
||||||
['extensions/chromium/options/*.*', CHROME_BUILD_DIR + '/options'],
|
['extensions/chromium/options/*.*', CHROME_BUILD_DIR + '/options'],
|
||||||
|
@ -435,7 +435,7 @@ var Annotation = (function AnnotationClosure() {
|
|||||||
// Properties
|
// Properties
|
||||||
]);
|
]);
|
||||||
var bbox = appearanceDict.getArray('BBox') || [0, 0, 1, 1];
|
var bbox = appearanceDict.getArray('BBox') || [0, 0, 1, 1];
|
||||||
var matrix = appearanceDict.getArray('Matrix') || [1, 0, 0, 1, 0 ,0];
|
var matrix = appearanceDict.getArray('Matrix') || [1, 0, 0, 1, 0, 0];
|
||||||
var transform = getTransformMatrix(data.rect, bbox, matrix);
|
var transform = getTransformMatrix(data.rect, bbox, matrix);
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
@ -609,22 +609,22 @@ var calculateSHA512 = (function calculateSHA512Closure() {
|
|||||||
var result;
|
var result;
|
||||||
if (!mode384) {
|
if (!mode384) {
|
||||||
result = new Uint8Array(64);
|
result = new Uint8Array(64);
|
||||||
h0.copyTo(result,0);
|
h0.copyTo(result, 0);
|
||||||
h1.copyTo(result,8);
|
h1.copyTo(result, 8);
|
||||||
h2.copyTo(result,16);
|
h2.copyTo(result, 16);
|
||||||
h3.copyTo(result,24);
|
h3.copyTo(result, 24);
|
||||||
h4.copyTo(result,32);
|
h4.copyTo(result, 32);
|
||||||
h5.copyTo(result,40);
|
h5.copyTo(result, 40);
|
||||||
h6.copyTo(result,48);
|
h6.copyTo(result, 48);
|
||||||
h7.copyTo(result,56);
|
h7.copyTo(result, 56);
|
||||||
} else {
|
} else {
|
||||||
result = new Uint8Array(48);
|
result = new Uint8Array(48);
|
||||||
h0.copyTo(result,0);
|
h0.copyTo(result, 0);
|
||||||
h1.copyTo(result,8);
|
h1.copyTo(result, 8);
|
||||||
h2.copyTo(result,16);
|
h2.copyTo(result, 16);
|
||||||
h3.copyTo(result,24);
|
h3.copyTo(result, 24);
|
||||||
h4.copyTo(result,32);
|
h4.copyTo(result, 32);
|
||||||
h5.copyTo(result,40);
|
h5.copyTo(result, 40);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -841,7 +841,7 @@ var SVGGraphics = (function SVGGraphicsClosure() {
|
|||||||
var height = args[j++];
|
var height = args[j++];
|
||||||
var xw = x + width;
|
var xw = x + width;
|
||||||
var yh = y + height;
|
var yh = y + height;
|
||||||
d.push('M', pf(x), pf(y), 'L', pf(xw) , pf(y), 'L', pf(xw), pf(yh),
|
d.push('M', pf(x), pf(y), 'L', pf(xw), pf(y), 'L', pf(xw), pf(yh),
|
||||||
'L', pf(x), pf(yh), 'Z');
|
'L', pf(x), pf(yh), 'Z');
|
||||||
break;
|
break;
|
||||||
case OPS.moveTo:
|
case OPS.moveTo:
|
||||||
@ -852,7 +852,7 @@ var SVGGraphics = (function SVGGraphicsClosure() {
|
|||||||
case OPS.lineTo:
|
case OPS.lineTo:
|
||||||
x = args[j++];
|
x = args[j++];
|
||||||
y = args[j++];
|
y = args[j++];
|
||||||
d.push('L', pf(x) , pf(y));
|
d.push('L', pf(x), pf(y));
|
||||||
break;
|
break;
|
||||||
case OPS.curveTo:
|
case OPS.curveTo:
|
||||||
x = args[j + 4];
|
x = args[j + 4];
|
||||||
|
@ -186,7 +186,7 @@ var WebGLUtils = (function WebGLUtilsClosure() {
|
|||||||
if (!smaskCache) {
|
if (!smaskCache) {
|
||||||
initSmaskGL();
|
initSmaskGL();
|
||||||
}
|
}
|
||||||
var cache = smaskCache,canvas = cache.canvas, gl = cache.gl;
|
var cache = smaskCache, canvas = cache.canvas, gl = cache.gl;
|
||||||
canvas.width = width;
|
canvas.width = width;
|
||||||
canvas.height = height;
|
canvas.height = height;
|
||||||
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
|
||||||
|
@ -148,7 +148,7 @@ var CFFDictDataMap = {
|
|||||||
},
|
},
|
||||||
'7': {
|
'7': {
|
||||||
name: 'FontMatrix',
|
name: 'FontMatrix',
|
||||||
operand: [0.001, 0, 0, 0.001, 0 , 0]
|
operand: [0.001, 0, 0, 0.001, 0, 0]
|
||||||
},
|
},
|
||||||
'8': {
|
'8': {
|
||||||
name: 'StrokeWidth',
|
name: 'StrokeWidth',
|
||||||
|
@ -250,7 +250,7 @@ describe('crypto', function() {
|
|||||||
key = hex2binary('000102030405060708090a0b0c0d0e0f');
|
key = hex2binary('000102030405060708090a0b0c0d0e0f');
|
||||||
iv = hex2binary('00000000000000000000000000000000');
|
iv = hex2binary('00000000000000000000000000000000');
|
||||||
cipher = new AES128Cipher(key);
|
cipher = new AES128Cipher(key);
|
||||||
result = cipher.encrypt(input,iv);
|
result = cipher.encrypt(input, iv);
|
||||||
expected = hex2binary('69c4e0d86a7b0430d8cdb78070b4c55a');
|
expected = hex2binary('69c4e0d86a7b0430d8cdb78070b4c55a');
|
||||||
expect(result).toEqual(expected);
|
expect(result).toEqual(expected);
|
||||||
});
|
});
|
||||||
@ -279,7 +279,7 @@ describe('crypto', function() {
|
|||||||
'191a1b1c1d1e1f');
|
'191a1b1c1d1e1f');
|
||||||
iv = hex2binary('00000000000000000000000000000000');
|
iv = hex2binary('00000000000000000000000000000000');
|
||||||
cipher = new AES256Cipher(key);
|
cipher = new AES256Cipher(key);
|
||||||
result = cipher.encrypt(input,iv);
|
result = cipher.encrypt(input, iv);
|
||||||
expected = hex2binary('8ea2b7ca516745bfeafc49904b496089');
|
expected = hex2binary('8ea2b7ca516745bfeafc49904b496089');
|
||||||
expect(result).toEqual(expected);
|
expect(result).toEqual(expected);
|
||||||
});
|
});
|
||||||
@ -293,7 +293,7 @@ describe('crypto', function() {
|
|||||||
'191a1b1c1d1e1f');
|
'191a1b1c1d1e1f');
|
||||||
iv = hex2binary('00000000000000000000000000000000');
|
iv = hex2binary('00000000000000000000000000000000');
|
||||||
cipher = new AES256Cipher(key);
|
cipher = new AES256Cipher(key);
|
||||||
result = cipher.decryptBlock(input,false,iv);
|
result = cipher.decryptBlock(input, false, iv);
|
||||||
expected = hex2binary('00112233445566778899aabbccddeeff');
|
expected = hex2binary('00112233445566778899aabbccddeeff');
|
||||||
expect(result).toEqual(expected);
|
expect(result).toEqual(expected);
|
||||||
});
|
});
|
||||||
@ -304,7 +304,7 @@ describe('crypto', function() {
|
|||||||
key = hex2binary('000102030405060708090a0b0c0d0e0f101112131415161718' +
|
key = hex2binary('000102030405060708090a0b0c0d0e0f101112131415161718' +
|
||||||
'191a1b1c1d1e1f');
|
'191a1b1c1d1e1f');
|
||||||
cipher = new AES256Cipher(key);
|
cipher = new AES256Cipher(key);
|
||||||
result = cipher.decryptBlock(input,false);
|
result = cipher.decryptBlock(input, false);
|
||||||
expected = hex2binary('00112233445566778899aabbccddeeff');
|
expected = hex2binary('00112233445566778899aabbccddeeff');
|
||||||
expect(result).toEqual(expected);
|
expect(result).toEqual(expected);
|
||||||
});
|
});
|
||||||
|
@ -200,22 +200,22 @@ var PDFDocumentProperties = (function PDFDocumentPropertiesClosure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove the D: prefix if it is available.
|
// Remove the D: prefix if it is available.
|
||||||
if (dateToParse.substring(0,2) === 'D:') {
|
if (dateToParse.substring(0, 2) === 'D:') {
|
||||||
dateToParse = dateToParse.substring(2);
|
dateToParse = dateToParse.substring(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all elements from the PDF date string.
|
// Get all elements from the PDF date string.
|
||||||
// JavaScript's Date object expects the month to be between
|
// JavaScript's Date object expects the month to be between
|
||||||
// 0 and 11 instead of 1 and 12, so we're correcting for this.
|
// 0 and 11 instead of 1 and 12, so we're correcting for this.
|
||||||
var year = parseInt(dateToParse.substring(0,4), 10);
|
var year = parseInt(dateToParse.substring(0, 4), 10);
|
||||||
var month = parseInt(dateToParse.substring(4,6), 10) - 1;
|
var month = parseInt(dateToParse.substring(4, 6), 10) - 1;
|
||||||
var day = parseInt(dateToParse.substring(6,8), 10);
|
var day = parseInt(dateToParse.substring(6, 8), 10);
|
||||||
var hours = parseInt(dateToParse.substring(8,10), 10);
|
var hours = parseInt(dateToParse.substring(8, 10), 10);
|
||||||
var minutes = parseInt(dateToParse.substring(10,12), 10);
|
var minutes = parseInt(dateToParse.substring(10, 12), 10);
|
||||||
var seconds = parseInt(dateToParse.substring(12,14), 10);
|
var seconds = parseInt(dateToParse.substring(12, 14), 10);
|
||||||
var utRel = dateToParse.substring(14,15);
|
var utRel = dateToParse.substring(14, 15);
|
||||||
var offsetHours = parseInt(dateToParse.substring(15,17), 10);
|
var offsetHours = parseInt(dateToParse.substring(15, 17), 10);
|
||||||
var offsetMinutes = parseInt(dateToParse.substring(18,20), 10);
|
var offsetMinutes = parseInt(dateToParse.substring(18, 20), 10);
|
||||||
|
|
||||||
// As per spec, utRel = 'Z' means equal to universal time.
|
// As per spec, utRel = 'Z' means equal to universal time.
|
||||||
// The other cases ('-' and '+') have to be handled here.
|
// The other cases ('-' and '+') have to be handled here.
|
||||||
|
Loading…
Reference in New Issue
Block a user