diff options
author | Andrew Dolgov <[email protected]> | 2018-12-03 15:46:54 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-12-03 15:46:54 +0300 |
commit | 4cb3a601a0fbeb0bf98c932bd5af8a3cffa8ab64 (patch) | |
tree | ed3dae8894591be12287b3cce3ff5b4cc6d1ce0e /plugins/shorten_expanded | |
parent | cd0a39ea4cb7137aef5b225bdc4472d207a48e62 (diff) | |
parent | 98986ce066764158c045c3e23b69e98183b94236 (diff) |
Merge branch 'js-objects' into weblate-integration
Diffstat (limited to 'plugins/shorten_expanded')
-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; }); }); - }); |