summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-05-06 09:49:04 +0300
committerAndrew Dolgov <[email protected]>2019-05-06 09:49:04 +0300
commit2411cc8d1c8478c1ae7e850b10e6431c2b330678 (patch)
tree541b9189d9c958fd4e9ec95599f340ff90dd5a68 /js
parent4b74491b8b3353ae82f4dc1468e1c20546e5e03d (diff)
js: add PluginHost.HOOK_COUNTERS_RECEIVED
Diffstat (limited to 'js')
-rw-r--r--js/Feeds.js2
-rw-r--r--js/PluginHost.js1
2 files changed, 3 insertions, 0 deletions
diff --git a/js/Feeds.js b/js/Feeds.js
index ba63aac47..8c1886263 100644
--- a/js/Feeds.js
+++ b/js/Feeds.js
@@ -44,6 +44,8 @@ define(["dojo/_base/declare"], function (declare) {
this._counters_prev = [];
},
parseCounters: function (elems) {
+ PluginHost.run(PluginHost.HOOK_COUNTERS_RECEIVED, elems);
+
for (let l = 0; l < elems.length; l++) {
if (Feeds._counters_prev[l] && this.counterEquals(elems[l], this._counters_prev[l])) {
diff --git a/js/PluginHost.js b/js/PluginHost.js
index f76b73464..c82d08971 100644
--- a/js/PluginHost.js
+++ b/js/PluginHost.js
@@ -13,6 +13,7 @@ PluginHost = {
HOOK_FLOATING_TITLE: 10,
HOOK_INIT_COMPLETE: 11,
HOOK_HEADLINE_RENDERED: 12,
+ HOOK_COUNTERS_RECEIVED: 13,
hooks: [],
register: function (name, callback) {
if (typeof(this.hooks[name]) == 'undefined')