From f89924f7a19871e26d5805a6c1863903c6e474bf Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 2 Dec 2018 18:38:27 +0300 Subject: set use strict on JS modules; remove some mostly useless stuff like get_minified_js() --- js/PluginHost.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/PluginHost.js') diff --git a/js/PluginHost.js b/js/PluginHost.js index a41694f34..9dbd91756 100644 --- a/js/PluginHost.js +++ b/js/PluginHost.js @@ -19,10 +19,10 @@ const PluginHost = { this.hooks[name].push(callback); }, run: function (name, args) { - console.warn('PluginHost::run ' + name); + //console.warn('PluginHost::run ' + name); if (typeof(this.hooks[name]) != 'undefined') - for (var i = 0; i < this.hooks[name].length; i++) + for (let i = 0; i < this.hooks[name].length; i++) if (!this.hooks[name][i](args)) break; } }; -- cgit v1.2.3 From 84affc7b1d71769038dfd25d74e40d6bf744e5fb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 3 Dec 2018 09:33:44 +0300 Subject: rework dojo singleton modules to better work with phpstorm completion (ugh) - declare() is not needed there anyway remove event.observe from login form (not needed) load pluginhost via amd --- js/PluginHost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/PluginHost.js') diff --git a/js/PluginHost.js b/js/PluginHost.js index 9dbd91756..8e5ff32ec 100644 --- a/js/PluginHost.js +++ b/js/PluginHost.js @@ -1,6 +1,6 @@ // based on http://www.velvetcache.org/2010/08/19/a-simple-javascript-hooks-system -const PluginHost = { +PluginHost = { HOOK_ARTICLE_RENDERED: 1, HOOK_ARTICLE_RENDERED_CDM: 2, HOOK_ARTICLE_SET_ACTIVE: 3, -- cgit v1.2.3