[Pkg-javascript-commits] [pdf.js] 79/246: Use strict equalities in web/debugger.js

David Prévot taffit at moszumanska.debian.org
Sun Sep 7 15:36:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit ddd3c8fc2fe7b8715bed6d6f146c206d133b5dd6
Author: Tim van der Meij <timvandermeij at gmail.com>
Date:   Thu Jul 31 22:01:54 2014 +0200

    Use strict equalities in web/debugger.js
---
 web/debugger.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/web/debugger.js b/web/debugger.js
index 0eed368..2251682 100644
--- a/web/debugger.js
+++ b/web/debugger.js
@@ -53,7 +53,7 @@ var FontInspector = (function FontInspectorClosure() {
     var selects = document.getElementsByTagName('input');
     for (var i = 0; i < selects.length; ++i) {
       var select = selects[i];
-      if (select.dataset.fontName != fontName) {
+      if (select.dataset.fontName !== fontName) {
         continue;
       }
       select.checked = !select.checked;
@@ -216,7 +216,7 @@ var StepperManager = (function StepperManagerClosure() {
       }
       for (i = 0; i < steppers.length; ++i) {
         var stepper = steppers[i];
-        if (stepper.pageIndex == pageIndex) {
+        if (stepper.pageIndex === pageIndex) {
           stepper.panel.removeAttribute('hidden');
         } else {
           stepper.panel.setAttribute('hidden', true);
@@ -225,7 +225,7 @@ var StepperManager = (function StepperManagerClosure() {
       var options = stepperChooser.options;
       for (i = 0; i < options.length; ++i) {
         var option = options[i];
-        option.selected = option.value == pageIndex;
+        option.selected = (option.value | 0) === pageIndex;
       }
     },
     saveBreakPoints: function saveBreakPoints(pageIndex, bps) {
@@ -332,7 +332,7 @@ var Stepper = (function StepperClosure() {
         line.className = 'line';
         line.dataset.idx = i;
         chunk.appendChild(line);
-        var checked = this.breakPoints.indexOf(i) != -1;
+        var checked = this.breakPoints.indexOf(i) !== -1;
         var args = operatorList.argsArray[i] || [];
 
         var breakCell = c('td');
@@ -419,7 +419,7 @@ var Stepper = (function StepperClosure() {
       var allRows = this.panel.getElementsByClassName('line');
       for (var x = 0, xx = allRows.length; x < xx; ++x) {
         var row = allRows[x];
-        if (row.dataset.idx == idx) {
+        if (parseInt(row.dataset.idx, 10) === idx) {
           row.style.backgroundColor = 'rgb(251,250,207)';
           row.scrollIntoView();
         } else {
@@ -597,7 +597,7 @@ var PDFBug = (function PDFBugClosure() {
       activePanel = index;
       var tools = this.tools;
       for (var j = 0; j < tools.length; ++j) {
-        if (j == index) {
+        if (j === index) {
           buttons[j].setAttribute('class', 'active');
           tools[j].active = true;
           tools[j].panel.removeAttribute('hidden');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list