summaryrefslogtreecommitdiff
path: root/js/PluginHost.js
diff options
context:
space:
mode:
authorGreg <supahgreg@users.noreply.github.com>2025-10-13 23:39:24 -0500
committerGitHub <noreply@github.com>2025-10-13 23:39:24 -0500
commit6505cbb592b91556ca25a2bf72ad1d8cb0b3bc2a (patch)
tree8ab133cc17a329ef7d99d152b3f6b4edc3830509 /js/PluginHost.js
parent0d2b1d601294802286aa26e5486c1c4fee92c05a (diff)
parent8b46ab31a96b6b6129f624719ac33ddf761805f1 (diff)
Merge pull request #42 from tt-rss/bugfix/eslint-config-and-findings
Get ESLint 9.x working, make the new config stricter, address findings
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);
}
};