Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.

Commit 8d7941a

Browse files
committed
Use strict comparison
1 parent 3be8df5 commit 8d7941a

File tree

1 file changed

+7
-7
lines changed
  • app/assets/javascripts/tinymce/plugins/uploadimage

1 file changed

+7
-7
lines changed

app/assets/javascripts/tinymce/plugins/uploadimage/plugin.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@
9898
for (var i = 0; i < inputs.length; i++) {
9999
var ctrl = inputs[i];
100100

101-
if (ctrl.tagName.toLowerCase() == 'input' && ctrl.type != 'hidden') {
102-
if (ctrl.type == 'file') {
101+
if (ctrl.tagName.toLowerCase() === 'input' && ctrl.type !== 'hidden') {
102+
if (ctrl.type === 'file') {
103103
ctrl.name = inputName('file');
104104

105105
// Hack styles
@@ -134,7 +134,7 @@
134134
}
135135

136136
function insertImage() {
137-
if (getInputValue(inputName('file')) == '') {
137+
if (getInputValue(inputName('file')) === '') {
138138
return handleError('You must choose a file');
139139
}
140140

@@ -228,7 +228,7 @@
228228

229229
var imgstr = "<img src='" + image['url'] + "'";
230230

231-
if (defaultClass != '') {
231+
if (defaultClass !== '') {
232232
imgstr += " class='" + defaultClass + ' ' + selectedClass + "'";
233233
}
234234

@@ -252,7 +252,7 @@
252252
}
253253
figstr += '>' + imgstr;
254254
figstr += '<figcaption';
255-
if (figcaptionClass != '') {
255+
if (figcaptionClass !== '') {
256256
figstr += " class='" + figcaptionClass + "'";
257257
}
258258
figstr += '>' + altText + '</figcaption>';
@@ -268,7 +268,7 @@
268268
var inputs = form.getElementsByTagName('input');
269269

270270
for (var i in inputs) {
271-
if (inputs[i].name == name) {
271+
if (inputs[i].name === name) {
272272
return inputs[i].value;
273273
}
274274
}
@@ -280,7 +280,7 @@
280280
var m = document.getElementsByTagName('meta');
281281

282282
for (var i in m) {
283-
if (m[i].name == mn) {
283+
if (m[i].name === mn) {
284284
return m[i].content;
285285
}
286286
}

0 commit comments

Comments
 (0)