mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
8374: Addressing review comments
This commit is contained in:
parent
58030804cb
commit
c12e1256e4
4 changed files with 66 additions and 56 deletions
|
@ -1,6 +1,6 @@
|
|||
var nextBodyIdx = 0;
|
||||
|
||||
$(document).ready(function(){
|
||||
$(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; display:inline-block;}');
|
||||
|
@ -28,15 +28,22 @@ function handleNewWallItemBodies() {
|
|||
var limited = processHeightLimit($el);
|
||||
|
||||
if (!limited) {
|
||||
var mutationObserver = new MutationObserver(function(mutations) {
|
||||
var mutationObserver = new MutationObserver(function() {
|
||||
var limited = processHeightLimit($el);
|
||||
if (limited) {
|
||||
mutationObserver.disconnect()
|
||||
}
|
||||
});
|
||||
mutationObserver.observe($el[0], { attributes: true, characterData: true, childList: true, subtree: true, attributeOldValue: true, characterDataOldValue: true });
|
||||
mutationObserver.observe($el[0], {
|
||||
attributes: true,
|
||||
characterData: true,
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributeOldValue: true,
|
||||
characterDataOldValue: true
|
||||
});
|
||||
|
||||
$el.imagesLoaded().then(function(){
|
||||
$el.imagesLoaded().then(function() {
|
||||
processHeightLimit($el);
|
||||
});
|
||||
}
|
||||
|
@ -79,5 +86,3 @@ function processHeightLimit($item) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue