Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
59.1
edited by Super Admin
on 2026/03/17 14:19
on 2026/03/17 14:19
Change comment:
There is no comment for this version
To version
58.1
edited by Super Admin
on 2026/03/17 14:05
on 2026/03/17 14:05
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -1005,12 +1005,8 @@ 1005 1005 } 1006 1006 // 長文投稿の折りたたみ初期化 1007 1007 document.querySelectorAll('.thread-post-body').forEach(function(body) { 1008 - // 先にtruncatedを仮適用してline-clampを有効にし、高さの差分で判定 1009 - var fullH = body.scrollHeight; 1010 - body.classList.add('truncated'); 1011 - var clampedH = body.clientHeight; 1012 - body.classList.remove('truncated'); 1013 - if (fullH > clampedH + 10) { 1008 + // 画像・ファイル添付を除いたテキスト部分の高さを判定 1009 + if (body.scrollHeight > body.clientHeight + 10 || body.textContent.length > 300) { 1014 1014 body.classList.add('truncated'); 1015 1015 var btn = document.createElement('button'); 1016 1016 btn.className = 'btn-read-more';