Repository navigation
Commit f0dd638
committed
Detect long code blocks by rendered height, not newline count
v1.1.1 counted "\n" in textContent to find blocks over 5 lines, but
SMF renders code line breaks as <br>, so textContent has no newlines
and every block looked like 1 line -> nothing collapsed and the
Expand button was hidden. Decide and clip purely by rendered height
(5 lines + padding) instead. Verified live on forum.siduction.org:
a 433px block now collapses to ~130px and the Erweitern/Verringern
toggle works.1 parent b575936 commit f0dd638
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
74 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | 85 | | |
| |||
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 101 | + | |
| 102 | + | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
| |||
0 commit comments