From f6933e9e504898764fc18623a51d7a766498d5ab Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Fri, 16 Jun 2023 23:05:30 +1200 Subject: [PATCH 1/3] 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 From 4336e4ab4323446e2e1e29e55f684bca3742f674 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sat, 17 Jun 2023 00:09:59 +1200 Subject: [PATCH 2/3] fix javascript audio buttons on hearthstone wiki --- lib/tree-updater.rkt | 4 ++++ static/main.css | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/lib/tree-updater.rkt b/lib/tree-updater.rkt index 9e30f32..109c875 100644 --- a/lib/tree-updater.rkt +++ b/lib/tree-updater.rkt @@ -110,6 +110,10 @@ #;(curry attribute-maybe-update 'class (λ (class) (string-join (classlist-updater (string-split class " ")) " "))) (curry attribute-maybe-update 'class class-updater) + ; audio buttons - sample: hearthstone/wiki/Diablo_(Duels_hero)#Sounds + (curry u + (λ (v) (has-class? "ext-audiobutton" v)) + (λ (v) (dict-set (dict-remove v 'hidden) 'controls '("")))) ; yet more uncollapsing - sample: warframe/wiki/Amp_(Ability) (curry u (λ (v) (and (dict-has-key? v 'id) diff --git a/static/main.css b/static/main.css index 3d3ed5a..9414470 100644 --- a/static/main.css +++ b/static/main.css @@ -210,6 +210,11 @@ figcaption, .lightbox-caption, .thumbcaption { display: block; } +/* javascript audio play buttons, see hearthstone/wiki/Diablo_(Duels_hero) */ +a.ext-audiobutton { + display: none; +} + /* animated slots */ #mw-content-text .animated > :not(.animated-active), #mw-content-text .animated > .animated-subframe > :not(.animated-active) { display: inline-block; From 61d28203420120aa0df009212bae6614b66c2ad8 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sat, 17 Jun 2023 00:16:11 +1200 Subject: [PATCH 3/3] fix some more play buttons on minecraft wiki --- static/main.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/main.css b/static/main.css index 9414470..1641886 100644 --- a/static/main.css +++ b/static/main.css @@ -210,10 +210,13 @@ figcaption, .lightbox-caption, .thumbcaption { display: block; } -/* javascript audio play buttons, see hearthstone/wiki/Diablo_(Duels_hero) */ -a.ext-audiobutton { +/* javascript audio play buttons */ +a.ext-audiobutton { /* see hearthstone/wiki/Diablo_(Duels_hero) */ display: none; } +.sound > [style="display:none"] { /* see minecraft/wiki/villager#Sounds */ + display: inline !important; +} /* animated slots */ #mw-content-text .animated > :not(.animated-active), #mw-content-text .animated > .animated-subframe > :not(.animated-active) {