1 var _shorten_expanded_threshold
= 1.5; //window heights
3 function expandSizeWrapper(id
) {
10 var content
= row
.select(".contentSizeWrapper")[0];
11 var link
= row
.select(".expandPrompt")[0];
13 if (content
) content
.removeClassName("contentSizeWrapper");
14 if (link
) Element
.hide(link
);
18 exception_error("expandSizeWrapper", e
);
25 dojo
.addOnLoad(function() {
26 PluginHost
.register(PluginHost
.HOOK_ARTICLE_RENDERED_CDM
, function(row
) {
27 if (getInitParam('cdm_expanded')) {
29 window
.setTimeout(function() {
31 if (row
.offsetHeight
>= _shorten_expanded_threshold
* window
.innerHeight
) {
32 var content
= row
.select(".cdmContentInner")[0];
35 content
.innerHTML
= "<div class='contentSizeWrapper'>" +
36 content
.innerHTML
+ "</div><button class='expandPrompt' onclick='return expandSizeWrapper(\""+row
.id
+"\")' "+
37 "href='#'>" + __("Click to expand article") + "</button>";