mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
#8374: Making postLimitHeight an addon parameter
This commit is contained in:
parent
ab24c621b2
commit
ed45145415
3 changed files with 55 additions and 6 deletions
|
@ -1,4 +1,8 @@
|
|||
$(document).ready(function(){
|
||||
$("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() {
|
||||
|
@ -60,7 +64,7 @@ function processHeightLimit($item) {
|
|||
|
||||
var itemId = $item.data("item-id");
|
||||
var $toggle = $("#wall-item-body-toggle-" + itemId);
|
||||
if ($item.height() < 250) {
|
||||
if ($item.height() < postLimitHeight) {
|
||||
$item.removeClass("limit-height");
|
||||
$toggle.hide();
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue