| 224 | |
| 225 | // 自动展开代码块 |
| 226 | function autoOpenCodeFunc() { |
| 227 | const pres = Array.from( |
| 228 | document.querySelectorAll<HTMLElement>( |
| 229 | "main div.blog-content-box pre.set-code-hide" |
| 230 | ) |
| 231 | ) |
| 232 | const presBox = Array.from( |
| 233 | document.querySelectorAll<HTMLElement>(".hide-preCode-box") |
| 234 | ) |
| 235 | |
| 236 | const readallBox = document.querySelector<HTMLElement>(".readall_box") |
| 237 | |
| 238 | pres.forEach((pre) => { |
| 239 | pre.style.height = "unset" |
| 240 | pre.style.maxHeight = "unset" |
| 241 | }) |
| 242 | presBox.forEach((box) => { |
| 243 | box.style.display = "none" |
| 244 | }) |
| 245 | |
| 246 | if (readallBox) { |
| 247 | const articleContent = |
| 248 | document.querySelector<HTMLElement>(".article_content") |
| 249 | |
| 250 | articleContent.style.height = "unset" |
| 251 | readallBox.style.display = "none" |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | // 隐藏移动端跳转APP弹窗 |
| 256 | function closeRedirectModalFunc() { |