mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
[showmore_dyn] Add support for 0 value to disable addon
This commit is contained in:
parent
ceb4f461da
commit
39280ea6bd
2 changed files with 10 additions and 14 deletions
|
@ -6,15 +6,14 @@ $(document).ready(function() {
|
|||
return;
|
||||
}
|
||||
|
||||
$("head").append('<style type="text/css"></style>');
|
||||
var newStyleElement = $("head").children(':last');
|
||||
newStyleElement.html('.limit-height{max-height: ' + postLimitHeight + 'px; overflow: hidden; }');
|
||||
|
||||
handleNewWallItemBodies();
|
||||
|
||||
document.addEventListener("postprocess_liveupdate", function() {
|
||||
if (postLimitHeight) {
|
||||
$('head').append('<style type="text/css">.limit-height{max-height: ' + postLimitHeight + 'px; overflow: hidden; }</style>');
|
||||
handleNewWallItemBodies();
|
||||
});
|
||||
|
||||
document.addEventListener('postprocess_liveupdate', function() {
|
||||
handleNewWallItemBodies();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function handleNewWallItemBodies() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue