Fix errors reported by the comma-spacing ESLint rule

http://eslint.org/docs/rules/comma-spacing
This commit is contained in:
Jonas Jenwald 2016-12-10 19:58:36 +01:00
parent 66d2637b3f
commit ad915f8af1
9 changed files with 36 additions and 36 deletions

View File

@ -72,7 +72,7 @@ function getHeaderFromHeaders(headers, headerName) {
function isPdfFile(details) {
var header = getHeaderFromHeaders(details.responseHeaders, 'content-type');
if (header) {
var headerValue = header.value.toLowerCase().split(';',1)[0].trim();
var headerValue = header.value.toLowerCase().split(';', 1)[0].trim();
if (headerValue === 'application/pdf') {
return true;
}
@ -153,7 +153,7 @@ chrome.webRequest.onHeadersReceived.addListener(
],
types: ['main_frame', 'sub_frame']
},
['blocking','responseHeaders']);
['blocking', 'responseHeaders']);
chrome.webRequest.onBeforeRequest.addListener(
function onBeforeRequestForFTP(details) {

View File

@ -883,7 +883,7 @@ target.chromium = function() {
'extensions/chromium/*.html',
'extensions/chromium/*.js',
'extensions/chromium/*.css',
'extensions/chromium/icon*.png',],
'extensions/chromium/icon*.png'],
CHROME_BUILD_DIR],
['extensions/chromium/pageAction/*.*', CHROME_BUILD_DIR + '/pageAction'],
['extensions/chromium/options/*.*', CHROME_BUILD_DIR + '/options'],

View File

@ -435,7 +435,7 @@ var Annotation = (function AnnotationClosure() {
// Properties
]);
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 self = this;

View File

@ -609,22 +609,22 @@ var calculateSHA512 = (function calculateSHA512Closure() {
var result;
if (!mode384) {
result = new Uint8Array(64);
h0.copyTo(result,0);
h1.copyTo(result,8);
h2.copyTo(result,16);
h3.copyTo(result,24);
h4.copyTo(result,32);
h5.copyTo(result,40);
h6.copyTo(result,48);
h7.copyTo(result,56);
h0.copyTo(result, 0);
h1.copyTo(result, 8);
h2.copyTo(result, 16);
h3.copyTo(result, 24);
h4.copyTo(result, 32);
h5.copyTo(result, 40);
h6.copyTo(result, 48);
h7.copyTo(result, 56);
} else {
result = new Uint8Array(48);
h0.copyTo(result,0);
h1.copyTo(result,8);
h2.copyTo(result,16);
h3.copyTo(result,24);
h4.copyTo(result,32);
h5.copyTo(result,40);
h0.copyTo(result, 0);
h1.copyTo(result, 8);
h2.copyTo(result, 16);
h3.copyTo(result, 24);
h4.copyTo(result, 32);
h5.copyTo(result, 40);
}
return result;
}

View File

@ -841,7 +841,7 @@ var SVGGraphics = (function SVGGraphicsClosure() {
var height = args[j++];
var xw = x + width;
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');
break;
case OPS.moveTo:
@ -852,7 +852,7 @@ var SVGGraphics = (function SVGGraphicsClosure() {
case OPS.lineTo:
x = args[j++];
y = args[j++];
d.push('L', pf(x) , pf(y));
d.push('L', pf(x), pf(y));
break;
case OPS.curveTo:
x = args[j + 4];

View File

@ -186,7 +186,7 @@ var WebGLUtils = (function WebGLUtilsClosure() {
if (!smaskCache) {
initSmaskGL();
}
var cache = smaskCache,canvas = cache.canvas, gl = cache.gl;
var cache = smaskCache, canvas = cache.canvas, gl = cache.gl;
canvas.width = width;
canvas.height = height;
gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);

View File

@ -148,7 +148,7 @@ var CFFDictDataMap = {
},
'7': {
name: 'FontMatrix',
operand: [0.001, 0, 0, 0.001, 0 , 0]
operand: [0.001, 0, 0, 0.001, 0, 0]
},
'8': {
name: 'StrokeWidth',

View File

@ -250,7 +250,7 @@ describe('crypto', function() {
key = hex2binary('000102030405060708090a0b0c0d0e0f');
iv = hex2binary('00000000000000000000000000000000');
cipher = new AES128Cipher(key);
result = cipher.encrypt(input,iv);
result = cipher.encrypt(input, iv);
expected = hex2binary('69c4e0d86a7b0430d8cdb78070b4c55a');
expect(result).toEqual(expected);
});
@ -279,7 +279,7 @@ describe('crypto', function() {
'191a1b1c1d1e1f');
iv = hex2binary('00000000000000000000000000000000');
cipher = new AES256Cipher(key);
result = cipher.encrypt(input,iv);
result = cipher.encrypt(input, iv);
expected = hex2binary('8ea2b7ca516745bfeafc49904b496089');
expect(result).toEqual(expected);
});
@ -293,7 +293,7 @@ describe('crypto', function() {
'191a1b1c1d1e1f');
iv = hex2binary('00000000000000000000000000000000');
cipher = new AES256Cipher(key);
result = cipher.decryptBlock(input,false,iv);
result = cipher.decryptBlock(input, false, iv);
expected = hex2binary('00112233445566778899aabbccddeeff');
expect(result).toEqual(expected);
});
@ -304,7 +304,7 @@ describe('crypto', function() {
key = hex2binary('000102030405060708090a0b0c0d0e0f101112131415161718' +
'191a1b1c1d1e1f');
cipher = new AES256Cipher(key);
result = cipher.decryptBlock(input,false);
result = cipher.decryptBlock(input, false);
expected = hex2binary('00112233445566778899aabbccddeeff');
expect(result).toEqual(expected);
});

View File

@ -200,22 +200,22 @@ var PDFDocumentProperties = (function PDFDocumentPropertiesClosure() {
}
// Remove the D: prefix if it is available.
if (dateToParse.substring(0,2) === 'D:') {
if (dateToParse.substring(0, 2) === 'D:') {
dateToParse = dateToParse.substring(2);
}
// Get all elements from the PDF date string.
// JavaScript's Date object expects the month to be between
// 0 and 11 instead of 1 and 12, so we're correcting for this.
var year = parseInt(dateToParse.substring(0,4), 10);
var month = parseInt(dateToParse.substring(4,6), 10) - 1;
var day = parseInt(dateToParse.substring(6,8), 10);
var hours = parseInt(dateToParse.substring(8,10), 10);
var minutes = parseInt(dateToParse.substring(10,12), 10);
var seconds = parseInt(dateToParse.substring(12,14), 10);
var utRel = dateToParse.substring(14,15);
var offsetHours = parseInt(dateToParse.substring(15,17), 10);
var offsetMinutes = parseInt(dateToParse.substring(18,20), 10);
var year = parseInt(dateToParse.substring(0, 4), 10);
var month = parseInt(dateToParse.substring(4, 6), 10) - 1;
var day = parseInt(dateToParse.substring(6, 8), 10);
var hours = parseInt(dateToParse.substring(8, 10), 10);
var minutes = parseInt(dateToParse.substring(10, 12), 10);
var seconds = parseInt(dateToParse.substring(12, 14), 10);
var utRel = dateToParse.substring(14, 15);
var offsetHours = parseInt(dateToParse.substring(15, 17), 10);
var offsetMinutes = parseInt(dateToParse.substring(18, 20), 10);
// As per spec, utRel = 'Z' means equal to universal time.
// The other cases ('-' and '+') have to be handled here.