diff --git a/extensions/chromium/pdfHandler.js b/extensions/chromium/pdfHandler.js index d32491f6cbe4c..07b8457f0ca7e 100644 --- a/extensions/chromium/pdfHandler.js +++ b/extensions/chromium/pdfHandler.js @@ -54,7 +54,7 @@ function isPdfDownloadable(details) { * @return {undefined|{name: string, value: string}} The header, if found. */ function getHeaderFromHeaders(headers, headerName) { - for (var i=0; i Math.abs(y - y0)) { x += stack.shift(); - } else { + } else { y += stack.shift(); } bezierCurveTo(xa, ya, xb, yb, x, y); diff --git a/src/core/fonts.js b/src/core/fonts.js index de81089b3b6b7..6364ba8577c37 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -2943,6 +2943,7 @@ var ErrorFont = (function ErrorFontClosure() { function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { var charCodeToGlyphId = Object.create(null); var glyphId, charCode, baseEncoding; + var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); if (properties.baseEncodingName) { // If a valid base encoding name was used, the mapping is initialized with @@ -2956,9 +2957,8 @@ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { charCodeToGlyphId[charCode] = 0; // notdef } } - } else if (!!(properties.flags & FontFlags.Symbolic)) { - // For a symbolic font the encoding should be the fonts built-in - // encoding. + } else if (isSymbolicFont) { + // For a symbolic font the encoding should be the fonts built-in encoding. for (charCode in builtInEncoding) { charCodeToGlyphId[charCode] = builtInEncoding[charCode]; } diff --git a/src/core/jbig2.js b/src/core/jbig2.js index 6478111dcde1e..ae82e5b6ceb42 100644 --- a/src/core/jbig2.js +++ b/src/core/jbig2.js @@ -977,7 +977,7 @@ var Jbig2Image = (function Jbig2ImageClosure() { var combinationOperator = pageInfo.combinationOperatorOverride ? regionInfo.combinationOperator : pageInfo.combinationOperator; var buffer = this.buffer; - var mask0 = 128 >> (regionInfo.x & 7); + var mask0 = 128 >> (regionInfo.x & 7); var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3); var i, j, mask, offset; switch (combinationOperator) { diff --git a/src/core/jpg.js b/src/core/jpg.js index 0812c8705a90d..d5a9bf836b437 100644 --- a/src/core/jpg.js +++ b/src/core/jpg.js @@ -616,7 +616,7 @@ var JpegImage = (function JpegImageClosure() { component = frame.components[i]; var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / frame.maxH); - var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * + var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / frame.maxV); var blocksPerLineForMcu = mcusPerLine * component.h; var blocksPerColumnForMcu = mcusPerColumn * component.v; diff --git a/src/core/jpx.js b/src/core/jpx.js index dc8b736745225..540b48e35bdb3 100644 --- a/src/core/jpx.js +++ b/src/core/jpx.js @@ -1484,7 +1484,7 @@ var JpxImage = (function JpxImageClosure() { var qcdOrQcc = (context.currentTile.QCC[c] !== undefined ? context.currentTile.QCC[c] : context.currentTile.QCD); component.quantizationParameters = qcdOrQcc; - var codOrCoc = (context.currentTile.COC[c] !== undefined ? + var codOrCoc = (context.currentTile.COC[c] !== undefined ? context.currentTile.COC[c] : context.currentTile.COD); component.codingStyleParameters = codOrCoc; } @@ -1552,7 +1552,7 @@ var JpxImage = (function JpxImageClosure() { })(); var InclusionTree = (function InclusionTreeClosure() { - function InclusionTree(width, height, defaultValue) { + function InclusionTree(width, height, defaultValue) { var levelsLength = log2(Math.max(width, height)) + 1; this.levels = []; for (var i = 0; i < levelsLength; i++) { diff --git a/src/core/murmurhash3.js b/src/core/murmurhash3.js index cb5a6c4f76006..c45bcc03e37f0 100644 --- a/src/core/murmurhash3.js +++ b/src/core/murmurhash3.js @@ -32,12 +32,12 @@ var Uint32ArrayView = sharedUtil.Uint32ArrayView; -var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) { +var MurmurHash3_64 = (function MurmurHash3_64Closure(seed) { // Workaround for missing math precision in JS. var MASK_HIGH = 0xffff0000; var MASK_LOW = 0xffff; - function MurmurHash3_64 (seed) { + function MurmurHash3_64(seed) { var SEED = 0xc3d2e1f0; this.h1 = seed ? seed & 0xffffffff : SEED; this.h2 = seed ? seed & 0xffffffff : SEED; @@ -145,7 +145,7 @@ var MurmurHash3_64 = (function MurmurHash3_64Closure (seed) { return this; }, - hexdigest: function MurmurHash3_64_hexdigest () { + hexdigest: function MurmurHash3_64_hexdigest() { var h1 = this.h1; var h2 = this.h2; diff --git a/src/core/parser.js b/src/core/parser.js index f063f66d4bbc9..378d30855fbcb 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -895,7 +895,7 @@ var Lexer = (function LexerClosure() { var x2 = toHexDigit(ch); if (x2 === -1) { warn('Lexer_getName: Illegal digit (' + - String.fromCharCode(ch) +') in hexadecimal number.'); + String.fromCharCode(ch) + ') in hexadecimal number.'); strBuf.push('#', String.fromCharCode(previousCh)); if (specialChars[ch]) { break; diff --git a/src/core/pdf_manager.js b/src/core/pdf_manager.js index 15656da0c35d8..c8ffaede75c70 100644 --- a/src/core/pdf_manager.js +++ b/src/core/pdf_manager.js @@ -210,7 +210,7 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() { result = value; } resolve(result); - } catch(e) { + } catch (e) { if (!(e instanceof MissingDataException)) { reject(e); return; diff --git a/src/core/type1_parser.js b/src/core/type1_parser.js index 6c7db24077b55..935faf552d1a3 100644 --- a/src/core/type1_parser.js +++ b/src/core/type1_parser.js @@ -86,7 +86,7 @@ var Type1CharString = (function Type1CharStringClosure() { 'rrcurveto': [8], 'callsubr': [10], 'flex': [12, 35], - 'drop' : [12, 18], + 'drop': [12, 18], 'endchar': [14], 'rmoveto': [21], 'hmoveto': [22], @@ -483,7 +483,7 @@ var Type1Parser = (function Type1ParserClosure() { return token === 'true' ? 1 : 0; }, - nextChar : function Type1_nextChar() { + nextChar: function Type1_nextChar() { return (this.currentChar = this.stream.getByte()); }, @@ -550,7 +550,7 @@ var Type1Parser = (function Type1ParserClosure() { this.getToken(); // read in 'dict' this.getToken(); // read in 'dup' this.getToken(); // read in 'begin' - while(true) { + while (true) { token = this.getToken(); if (token === null || token === 'end') { break; diff --git a/src/display/api.js b/src/display/api.js index 0e37fb9a83bdb..cb4ad0383949e 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -1314,7 +1314,7 @@ var PDFWorker = (function PDFWorkerClosure() { } try { sendTest(); - } catch (e) { + } catch (e) { // We need fallback to a faked worker. this._setupFakeWorker(); } diff --git a/src/display/canvas.js b/src/display/canvas.js index d09d15919f2a6..47d07a90136ce 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -654,7 +654,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { } if (sourceCtx.setLineDash !== undefined) { destCtx.setLineDash(sourceCtx.getLineDash()); - destCtx.lineDashOffset = sourceCtx.lineDashOffset; + destCtx.lineDashOffset = sourceCtx.lineDashOffset; } } @@ -1780,13 +1780,13 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { this.save(); this.baseTransformStack.push(this.baseTransform); - if (isArray(matrix) && 6 === matrix.length) { + if (isArray(matrix) && matrix.length === 6) { this.transform.apply(this, matrix); } this.baseTransform = this.ctx.mozCurrentTransform; - if (isArray(bbox) && 4 === bbox.length) { + if (isArray(bbox) && bbox.length === 4) { var width = bbox[2] - bbox[0]; var height = bbox[3] - bbox[1]; this.ctx.rect(bbox[0], bbox[1], width, height); @@ -1862,7 +1862,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { var cacheId = 'groupAt' + this.groupLevel; if (group.smask) { // Using two cache entries is case if masks are used one after another. - cacheId += '_smask_' + ((this.smaskCounter++) % 2); + cacheId += '_smask_' + ((this.smaskCounter++) % 2); } var scratchCanvas = this.cachedCanvases.getCanvas( cacheId, drawnWidth, drawnHeight, true); @@ -1947,7 +1947,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { matrix) { this.save(); - if (isArray(rect) && 4 === rect.length) { + if (isArray(rect) && rect.length === 4) { var width = rect[2] - rect[0]; var height = rect[3] - rect[1]; this.ctx.rect(rect[0], rect[1], width, height); diff --git a/src/display/svg.js b/src/display/svg.js index 92be5e7883d96..9530095c7324a 100644 --- a/src/display/svg.js +++ b/src/display/svg.js @@ -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]; diff --git a/src/display/text_layer.js b/src/display/text_layer.js index 19e5748f83785..d14a5f6bef904 100644 --- a/src/display/text_layer.js +++ b/src/display/text_layer.js @@ -374,7 +374,7 @@ var renderTextLayer = (function renderTextLayerClosure() { i++; } var j = horizon.length - 1; - while(j >= 0 && horizon[j].start >= boundary.y2) { + while (j >= 0 && horizon[j].start >= boundary.y2) { j--; } diff --git a/src/display/webgl.js b/src/display/webgl.js index bd45861846c56..4c02fd7ca6a63 100644 --- a/src/display/webgl.js +++ b/src/display/webgl.js @@ -165,12 +165,12 @@ var WebGLUtils = (function WebGLUtilsClosure() { var texCoordBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ - 0.0, 0.0, - 1.0, 0.0, - 0.0, 1.0, - 0.0, 1.0, - 1.0, 0.0, - 1.0, 1.0]), gl.STATIC_DRAW); + 0.0, 0.0, + 1.0, 0.0, + 0.0, 1.0, + 0.0, 1.0, + 1.0, 0.0, + 1.0, 1.0]), gl.STATIC_DRAW); gl.enableVertexAttribArray(texCoordLocation); gl.vertexAttribPointer(texCoordLocation, 2, gl.FLOAT, false, 0, 0); @@ -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); diff --git a/src/shared/cffStandardStrings.js b/src/shared/cffStandardStrings.js index 7fa8ef78266bc..fbfc1378be5f9 100644 --- a/src/shared/cffStandardStrings.js +++ b/src/shared/cffStandardStrings.js @@ -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', diff --git a/src/shared/util.js b/src/shared/util.js index de33f2be943f8..4e3e501971b7a 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -557,7 +557,7 @@ function arraysToBytes(arr) { } var resultLength = 0; var i, ii = arr.length; - var item, itemLength ; + var item, itemLength; for (i = 0; i < ii; i++) { item = arr[i]; itemLength = arrayByteLength(item); @@ -1766,7 +1766,7 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) { u.pathname = 'c%20d'; hasWorkingUrl = u.href === 'http://a/c%20d'; } - } catch(e) { } + } catch (e) { } if (hasWorkingUrl) { return; @@ -1925,7 +1925,7 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) { break; case 'relative or authority': - if ('/' === c && '/' === input[cursor+1]) { + if ('/' === c && '/' === input[cursor + 1]) { state = 'authority ignore slashes'; } else { err('Expected /, got: ' + c); @@ -1970,8 +1970,8 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) { this._password = base._password; state = 'fragment'; } else { - var nextC = input[cursor+1]; - var nextNextC = input[cursor+2]; + var nextC = input[cursor + 1]; + var nextNextC = input[cursor + 2]; if ('file' !== this._scheme || !ALPHA.test(c) || (nextC !== ':' && nextC !== '|') || (EOF !== nextNextC && '/' !== nextNextC && '\\' !== nextNextC && @@ -2166,7 +2166,7 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) { err('\\ not allowed in relative path.'); } var tmp; - if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { + if ((tmp = relativePathDotMapping[buffer.toLowerCase()])) { buffer = tmp; } if ('..' === buffer) { diff --git a/test/driver.js b/test/driver.js index b1ab04a3e252e..466cd2bedc1dc 100644 --- a/test/driver.js +++ b/test/driver.js @@ -288,7 +288,7 @@ var Driver = (function DriverClosure() { var self = this; window.onerror = function(message, source, line, column, error) { self._info('Error: ' + message + ' Script: ' + source + ' Line: ' + - line + ' Column: ' + column + ' StackTrace: ' + error); + line + ' Column: ' + column + ' StackTrace: ' + error); }; this._info('User agent: ' + navigator.userAgent); this._log('Harness thinks this browser is "' + this.browser + diff --git a/test/stats/statcmp.js b/test/stats/statcmp.js index 37b8bf66b4d61..0b15dc5ab1735 100644 --- a/test/stats/statcmp.js +++ b/test/stats/statcmp.js @@ -159,7 +159,7 @@ function stat(baseline, current) { } // add horizontal line - var hline = width.map(function(w) { return new Array(w+1).join('-'); }); + var hline = width.map(function(w) { return new Array(w + 1).join('-'); }); rows.splice(1, 0, hline); // print output @@ -179,14 +179,14 @@ function main() { try { var baselineFile = fs.readFileSync(options.baseline).toString(); baseline = flatten(JSON.parse(baselineFile)); - } catch(e) { + } catch (e) { console.log('Error reading file "' + options.baseline + '": ' + e); process.exit(0); } try { var currentFile = fs.readFileSync(options.current).toString(); current = flatten(JSON.parse(currentFile)); - } catch(e) { + } catch (e) { console.log('Error reading file "' + options.current + '": ' + e); process.exit(0); } diff --git a/test/test.js b/test/test.js index f82937b11c66b..fa588fd2b1f1b 100644 --- a/test/test.js +++ b/test/test.js @@ -81,7 +81,7 @@ function parseOptions() { 'test_manifest.json')) .check(describeCheck(function (argv) { return !argv.browser || !argv.browserManifestFile; - }, '--browser and --browserManifestFile must not be specified at the ' +'' + + }, '--browser and --browserManifestFile must not be specified at the ' + 'same time.')); var result = yargs.argv; if (result.help) { diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js index d4c2f57734880..06484106be8c1 100644 --- a/test/unit/api_spec.js +++ b/test/unit/api_spec.js @@ -505,7 +505,7 @@ describe('api', function() { // PageLabels with bad "Prefix" entries. var url3 = new URL('../pdfs/bad-PageLabels.pdf', window.location).href; - var loadingTask3 = new PDFJS.getDocument(url3); + var loadingTask3 = PDFJS.getDocument(url3); var promise3 = loadingTask3.promise.then(function (pdfDoc) { return pdfDoc.getPageLabels(); }); diff --git a/test/unit/crypto_spec.js b/test/unit/crypto_spec.js index 4d67bc9a08ce8..f4b7aa2b558e9 100644 --- a/test/unit/crypto_spec.js +++ b/test/unit/crypto_spec.js @@ -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); }); diff --git a/test/unit/jasmine-boot.js b/test/unit/jasmine-boot.js index fd2bc64a3962c..03cdfcb812438 100644 --- a/test/unit/jasmine-boot.js +++ b/test/unit/jasmine-boot.js @@ -203,4 +203,3 @@ function initializePDFJS(callback) { return destination; } }()); - diff --git a/test/unit/primitives_spec.js b/test/unit/primitives_spec.js index 7dd150aa8e169..29c00e2abcf6c 100644 --- a/test/unit/primitives_spec.js +++ b/test/unit/primitives_spec.js @@ -346,12 +346,12 @@ describe('primitives', function() { }); describe('isRef', function () { - it ('handles non-refs', function () { + it('handles non-refs', function () { var nonRef = {}; expect(isRef(nonRef)).toEqual(false); }); - it ('handles refs', function () { + it('handles refs', function () { var ref = new Ref(1, 0); expect(isRef(ref)).toEqual(true); }); diff --git a/test/unit/type1_parser_spec.js b/test/unit/type1_parser_spec.js index 3d9a4424ac2a3..cc8825e82f056 100644 --- a/test/unit/type1_parser_spec.js +++ b/test/unit/type1_parser_spec.js @@ -70,10 +70,10 @@ describe('Type1Parser', function() { var stream = new StringStream( '/ExpansionFactor 99\n' + '/Subrs 1 array\n' + - 'dup 0 1 RD x noaccess put\n'+ + 'dup 0 1 RD x noaccess put\n' + 'end\n' + '/CharStrings 46 dict dup begin\n' + - '/.notdef 1 RD x ND' + '\n' + + '/.notdef 1 RD x ND\n' + 'end'); var parser = new Type1Parser(stream, false, SEAC_ANALYSIS_ENABLED); var program = parser.extractFontProgram(); diff --git a/test/unit/ui_utils_spec.js b/test/unit/ui_utils_spec.js index d93b16fa55286..514e59aeebcbc 100644 --- a/test/unit/ui_utils_spec.js +++ b/test/unit/ui_utils_spec.js @@ -117,4 +117,3 @@ describe('ui_utils', function() { }); }); }); - diff --git a/web/compatibility.js b/web/compatibility.js index f040e2a2769d9..4300686e56551 100644 --- a/web/compatibility.js +++ b/web/compatibility.js @@ -270,7 +270,7 @@ if (typeof PDFJS === 'undefined') { // initialize result and counters var bc = 0, bs, buffer, idx = 0, output = ''; // get next character - buffer = input.charAt(idx++); + (buffer = input.charAt(idx++)); // character found in table? // initialize bit storage and add its ascii value ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, diff --git a/web/firefoxcom.js b/web/firefoxcom.js index 05377113faf3e..0b1a4122f2d09 100644 --- a/web/firefoxcom.js +++ b/web/firefoxcom.js @@ -173,7 +173,7 @@ Preferences._readFromStorage = function (prefObj) { highlightAll: !!evt.detail.highlightAll, findPrevious: !!evt.detail.findPrevious }); - }.bind(this); + }; for (var i = 0, len = events.length; i < len; i++) { window.addEventListener(events[i], handleEvent); diff --git a/web/pdf_document_properties.js b/web/pdf_document_properties.js index 141c499a15bb7..0e7471c391e31 100644 --- a/web/pdf_document_properties.js +++ b/web/pdf_document_properties.js @@ -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. diff --git a/web/secondary_toolbar.js b/web/secondary_toolbar.js index eb43de5861439..427b947a083af 100644 --- a/web/secondary_toolbar.js +++ b/web/secondary_toolbar.js @@ -188,7 +188,7 @@ var SecondaryToolbar = (function SecondaryToolbarClosure() { toggleHandToolButton.firstElementChild.textContent = mozL10n.get('hand_tool_enable_label', null, 'Enable hand tool'); } - }.bind(this)); + }); }, open: function SecondaryToolbar_open() { diff --git a/web/ui_utils.js b/web/ui_utils.js index 1090dc34504b5..4ec78c1e12560 100644 --- a/web/ui_utils.js +++ b/web/ui_utils.js @@ -260,7 +260,7 @@ function approximateFraction(x) { var limit = 8; if (xinv > limit) { return [1, limit]; - } else if (Math.floor(xinv) === xinv) { + } else if (Math.floor(xinv) === xinv) { return [1, xinv]; } @@ -384,7 +384,7 @@ function getPDFFileNameFromURL(url) { try { suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0]; - } catch(e) { // Possible (extremely rare) errors: + } catch (e) { // Possible (extremely rare) errors: // URIError "Malformed URI", e.g. for "%AA.pdf" // TypeError "null has no properties", e.g. for "%2F.pdf" } diff --git a/web/viewer.js b/web/viewer.js index c4fafe5122b41..d3dd4507a2fc8 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -54,7 +54,7 @@ function getViewerConfiguration() { return { appContainer: document.body, mainContainer: document.getElementById('viewerContainer'), - viewerContainer: document.getElementById('viewer'), + viewerContainer: document.getElementById('viewer'), eventBus: null, // using global event bus with DOM events toolbar: { container: document.getElementById('toolbarViewer'),