Uncollapse more wiki sections

This commit is contained in:
Cadence Ember 2022-11-15 20:45:44 +13:00
parent 8c7a045830
commit ef12faf72d
Signed by untrusted user: cadence
GPG key ID: BC1C2C61CF521B17

View file

@ -205,6 +205,16 @@
attributes) attributes)
;; children ;; children
((compose1 ((compose1
; more uncollapsing - sample: bandori/wiki/BanG_Dream!_Wikia
(curry u
(λ (v) (has-class? "mw-collapsible-content" attributes))
(λ (v) (for/list ([element v])
(u (λ (element) (pair? element))
(λ (element)
`(,(car element)
(@ ,@(attribute-maybe-update 'style (λ (a) (regexp-replace #rx"display: *none" a "display:inline")) (bits->attributes element)))
,@(filter element-is-content? (cdr element))))
element))))
; wrap blinking animated images in a slot so they can be animated with CSS ; wrap blinking animated images in a slot so they can be animated with CSS
(curry u (curry u
(λ (v) (and (has-class? "animated" attributes) (λ (v) (and (has-class? "animated" attributes)