diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/scripts/linkwiz.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js index a78c8c52c..bdc825e0e 100644 --- a/lib/scripts/linkwiz.js +++ b/lib/scripts/linkwiz.js @@ -180,7 +180,7 @@ class LinkWizard { */ resultClick(a) { this.$entry.val(a.title); - if (a.title == '' || a.title.substr(a.title.length - 1) == ':') { + if (a.title === '' || a.title.charAt(a.title.length - 1) === ':') { this.autocomplete_exec(); } else { if (jQuery(a.nextSibling).is('span')) { @@ -205,14 +205,14 @@ class LinkWizard { } sel = DWgetSelection(this.textArea); - if (sel.start == 0 && sel.end == 0) { + if (sel.start === 0 && sel.end === 0) { sel = this.selection; } stxt = sel.getText(); // don't include trailing space in selection - if (stxt.charAt(stxt.length - 1) == ' ') { + if (stxt.charAt(stxt.length - 1) === ' ') { sel.end--; stxt = sel.getText(); } @@ -222,8 +222,8 @@ class LinkWizard { } // prepend colon inside namespaces for non namespace pages - if (this.textArea.form.id.value.indexOf(':') != -1 && - link.indexOf(':') == -1) { + if (this.textArea.form.id.value.indexOf(':') !== -1 && + link.indexOf(':') === -1) { link = ':' + link; } @@ -320,7 +320,7 @@ class LinkWizard { * Toggle the link wizard */ toggle() { - if (this.$wiz.css('display') == 'none') { + if (this.$wiz.css('display') === 'none') { this.show(); } else { this.hide(); |