From f6933e9e504898764fc18623a51d7a766498d5ab Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Fri, 16 Jun 2023 23:05:30 +1200 Subject: [PATCH] expand all Warframe ability collapsibles --- lib/tree-updater.rkt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/tree-updater.rkt b/lib/tree-updater.rkt index 098af3d..9e30f32 100644 --- a/lib/tree-updater.rkt +++ b/lib/tree-updater.rkt @@ -110,6 +110,11 @@ #;(curry attribute-maybe-update 'class (λ (class) (string-join (classlist-updater (string-split class " ")) " "))) (curry attribute-maybe-update 'class class-updater) + ; yet more uncollapsing - sample: warframe/wiki/Amp_(Ability) + (curry u + (λ (v) (and (dict-has-key? v 'id) + (string-prefix? (car (dict-ref v 'id)) "mw-customcollapsible"))) + (λ (v) (dict-set v 'style "display:block"))) ; change links to stay on the same wiki (curry attribute-maybe-update 'href (λ (href) @@ -245,6 +250,9 @@ ; remove gamespot reviews/ads [(has-class? "reviews" attributes) return-no-element] + ; remove customcollapsible customtoggle buttons - sample: warframe/wiki/Amp_(Ability) + [(and (dict-has-key? attributes 'class) (regexp-match? #rx"^mw-customtoggle-[^ ]* button-c$" (car (dict-ref attributes 'class)))) + return-no-element] [#t (list element-type ;; attributes