Last modified by Super Admin on 2026/04/05 18:59

From version Icon 68.1 Icon
edited by Super Admin
on 2026/03/18 11:28
Change comment: There is no comment for this version
To version Icon 66.1 Icon
edited by Super Admin
on 2026/03/18 09:18
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -1075,15 +1075,14 @@
1075 1075   document.querySelectorAll('.activity-thread-header').forEach(function(header) {
1076 1076   header.addEventListener('click', toggleThreadExpand);
1077 1077   });
1078 - // 長文投稿の折りたたみ初期化(max-height: 12em 超で省略)
1078 + // 長文投稿の折りたたみ初期化
1079 1079   document.querySelectorAll('.thread-post-body').forEach(function(body) {
1080 - // pre-wrapのまま高さ測定、max-height(12em ≒ ~200px)超える場合折りたたむ
1080 + // 先にtruncated仮適用てline-clampを有効し、高さの差分で判定
1081 1081   var fullH = body.scrollHeight;
1082 - // 12em を px に変換(font-size × line-height × 行数 の近似値ではなくCSSと同じ値を取得)
1083 1083   body.classList.add('truncated');
1084 - var maxH = body.clientHeight; // max-height: 12em 適用後の高さ
1083 + var clampedH = body.clientHeight;
1085 1085   body.classList.remove('truncated');
1086 - if (fullH > maxH + 30) {
1085 + if (fullH > clampedH + 10) {
1087 1087   body.classList.add('truncated');
1088 1088   var btn = document.createElement('button');
1089 1089   btn.className = 'btn-read-more';