mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-10-12 19:41:04 +02:00
Allow to unregister plugin hooks
This commit is contained in:
parent
84d43a1b44
commit
44bfbc9529
@ -29,6 +29,11 @@ PluginHost = {
|
|||||||
for (let i = 0; i < this.hooks[name].length; i++) {
|
for (let i = 0; i < this.hooks[name].length; i++) {
|
||||||
this.hooks[name][i](args);
|
this.hooks[name][i](args);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
unregister: function (name, callback) {
|
||||||
|
for (var i = 0; i < this.hooks[name].length; i++)
|
||||||
|
if (this.hooks[name][i] == callback)
|
||||||
|
this.hooks[name].splice(i, 1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user