summaryrefslogtreecommitdiff
path: root/js/PluginHost.js
diff options
context:
space:
mode:
authorsupahgreg <supahgreg@users.noreply.github.com>2025-10-12 21:02:39 +0000
committersupahgreg <supahgreg@users.noreply.github.com>2025-10-12 21:34:29 +0000
commit39182a76e4070d3b92af10bf609fef8151bce6e4 (patch)
tree806c6e1b1ab421a2631f5e9062a8988480f8ba31 /js/PluginHost.js
parent1299d632bdc8b676d3fc2114a1788a2f8f63597c (diff)
Address ESLint rule 'eqeqeq'.
https://eslint.org/docs/latest/rules/eqeqeq
Diffstat (limited to 'js/PluginHost.js')
-rw-r--r--js/PluginHost.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/PluginHost.js b/js/PluginHost.js
index 513429e4a..e770c7050 100644
--- a/js/PluginHost.js
+++ b/js/PluginHost.js
@@ -24,7 +24,7 @@ const PluginHost = {
HOOK_HEADLINE_TOOLBAR_SELECT_MENU_ITEM2: 19,
hooks: [],
register: function (name, callback) {
- if (typeof(this.hooks[name]) == 'undefined')
+ if (typeof(this.hooks[name]) === 'undefined')
this.hooks[name] = [];
this.hooks[name].push(callback);
@@ -32,7 +32,7 @@ const PluginHost = {
run: function (name, args) {
//console.warn('PluginHost.run', name);
- if (typeof(this.hooks[name]) != 'undefined')
+ if (typeof(this.hooks[name]) !== 'undefined')
for (let i = 0; i < this.hooks[name].length; i++) {
this.hooks[name][i](args);
}
@@ -40,9 +40,9 @@ const PluginHost = {
run_until: function (name, check, ...args) {
//console.warn('PluginHost.run_until', name, check, args);
- if (typeof(this.hooks[name]) != 'undefined')
+ if (typeof(this.hooks[name]) !== 'undefined')
for (let i = 0; i < this.hooks[name].length; i++) {
- if (this.hooks[name][i](args) == check)
+ if (this.hooks[name][i](args) === check)
return true;
}
@@ -50,7 +50,7 @@ const PluginHost = {
},
unregister: function (name, callback) {
for (let i = 0; i < this.hooks[name].length; i++)
- if (this.hooks[name][i] == callback)
+ if (this.hooks[name][i] === callback)
this.hooks[name].splice(i, 1);
}
};