[Pkg-javascript-commits] [pdf.js] 55/246: Use strict equalities in web/ui_utils.js
David Prévot
taffit at moszumanska.debian.org
Sun Sep 7 15:36:25 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 24cf9694228af36084f9c4d7c45d65006e99613d
Author: Tim van der Meij <timvandermeij at gmail.com>
Date: Thu Jul 31 21:47:23 2014 +0200
Use strict equalities in web/ui_utils.js
---
web/ui_utils.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/web/ui_utils.js b/web/ui_utils.js
index 29ee01b..b38ec4b 100644
--- a/web/ui_utils.js
+++ b/web/ui_utils.js
@@ -30,7 +30,7 @@ var CustomStyle = (function CustomStyleClosure() {
CustomStyle.getProp = function get(propName, element) {
// check cache only when no element is given
- if (arguments.length == 1 && typeof _cache[propName] == 'string') {
+ if (arguments.length === 1 && typeof _cache[propName] === 'string') {
return _cache[propName];
}
@@ -38,7 +38,7 @@ var CustomStyle = (function CustomStyleClosure() {
var style = element.style, prefixed, uPropName;
// test standard property first
- if (typeof style[propName] == 'string') {
+ if (typeof style[propName] === 'string') {
return (_cache[propName] = propName);
}
@@ -48,7 +48,7 @@ var CustomStyle = (function CustomStyleClosure() {
// test vendor specific properties
for (var i = 0, l = prefixes.length; i < l; i++) {
prefixed = prefixes[i] + uPropName;
- if (typeof style[prefixed] == 'string') {
+ if (typeof style[prefixed] === 'string') {
return (_cache[propName] = prefixed);
}
}
@@ -59,7 +59,7 @@ var CustomStyle = (function CustomStyleClosure() {
CustomStyle.setProp = function set(propName, element, str) {
var prop = this.getProp(propName);
- if (prop != 'undefined') {
+ if (prop !== 'undefined') {
element.style[prop] = str;
}
};
@@ -93,7 +93,7 @@ function getOutputScale(ctx) {
return {
sx: pixelRatio,
sy: pixelRatio,
- scaled: pixelRatio != 1
+ scaled: pixelRatio !== 1
};
}
@@ -161,7 +161,7 @@ function getPDFFileNameFromURL(url) {
reFilename.exec(splitURI[3]);
if (suggestedFilename) {
suggestedFilename = suggestedFilename[0];
- if (suggestedFilename.indexOf('%') != -1) {
+ if (suggestedFilename.indexOf('%') !== -1) {
// URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf
try {
suggestedFilename =
--
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