]> git.mxchange.org Git - friendica-addons.git/blobdiff - showmore_dyn/showmore_dyn.js
[twitter] Fix return value of twitter_user_to_contact()
[friendica-addons.git] / showmore_dyn / showmore_dyn.js
index 9864f24a1bb5a6443e3816187bae301586f2900c..4b32b2d31d7da499a474bba34869ce2de7dbe886 100644 (file)
@@ -1,9 +1,14 @@
 var nextBodyIdx = 0;
 
 $(document).ready(function() {
+       loc = window.location.pathname;
+       if (loc.startsWith('/display')) {
+               return;
+       }
+
        $("head").append('<style type="text/css"></style>');
        var newStyleElement = $("head").children(':last');
-       newStyleElement.html('.limit-height{max-height: ' + postLimitHeight + 'px; overflow: hidden; display:inline-block;}');
+       newStyleElement.html('.limit-height{max-height: ' + postLimitHeight + 'px; overflow: hidden; }');
 
        handleNewWallItemBodies();
 
@@ -53,11 +58,9 @@ function handleNewWallItemBodies() {
 function addHeightToggleHandler($item) {
        var itemId = parseInt($item.attr("id").replace("wall-item-body-", ""));
        $item.data("item-id", itemId);
-       var wrapperId = "wall-item-body-wrapper-" + itemId;
        var toggleId = "wall-item-body-toggle-" + itemId;
 
-       $item.wrap('<div id="' + wrapperId + '" class="wall-item-body-wrapper"></div>');
-       $("#" + wrapperId).append('<div class="wall-item-body-toggle" data-item-id="' + itemId + '" id="' + toggleId + '" ><button type="button" class="wall-item-body-toggle-text">' + showmore_dyn_showmore_linktext + '</button></div>');
+       $item.append('<div class="wall-item-body-toggle" data-item-id="' + itemId + '" id="' + toggleId + '" ><button type="button" class="wall-item-body-toggle-text">' + showmore_dyn_showmore_linktext + '</button></div>');
        $item.addClass("limitable limit-height");
 
        var $toggle = $("#" + toggleId);