diff options
author | Andrew Dolgov <[email protected]> | 2018-12-03 13:38:13 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-03 13:38:13 +0300 |
commit | 71fc6d45bd761a9d2715faa68f2b8c0271ee7169 (patch) | |
tree | 47677db3e0d147dbe5c3d3cc71a6576a392881f3 /plugins/shorten_expanded/init.js | |
parent | a049b5bd88f3ce07af0e2aa7c21992dc0605eea6 (diff) |
refactor error reporting to AppBase; keep exception_error() for now as a shim
Diffstat (limited to 'plugins/shorten_expanded/init.js')
-rw-r--r-- | plugins/shorten_expanded/init.js | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/plugins/shorten_expanded/init.js b/plugins/shorten_expanded/init.js index d9995e8ac..a5424ea38 100644 --- a/plugins/shorten_expanded/init.js +++ b/plugins/shorten_expanded/init.js @@ -1,29 +1,20 @@ var _shorten_expanded_threshold = 1.5; //window heights function expandSizeWrapper(id) { - try { - const row = $(id); + const row = $(id); - console.log(row); + if (row) { + const content = row.select(".contentSizeWrapper")[0]; + const link = row.select(".expandPrompt")[0]; - if (row) { - const content = row.select(".contentSizeWrapper")[0]; - const link = row.select(".expandPrompt")[0]; - - if (content) content.removeClassName("contentSizeWrapper"); - if (link) Element.hide(link); - - } - } catch (e) { - exception_error("expandSizeWrapper", e); + if (content) content.removeClassName("contentSizeWrapper"); + if (link) Element.hide(link); } return false; - } require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) { - ready(function() { PluginHost.register(PluginHost.HOOK_ARTICLE_RENDERED_CDM, function(row) { window.setTimeout(function() { @@ -48,5 +39,4 @@ require(['dojo/_base/kernel', 'dojo/ready'], function (dojo, ready) { return true; }); }); - }); |