Compare commits

..

8 commits

Author SHA1 Message Date
f5399524b1
Prevent linking to tabs with no IDs 2023-11-06 20:15:18 +11:00
ead6896818
Add the ability to specify/open the last open tab in the URL 2023-11-06 20:15:18 +11:00
9773e62c46
Add better support for tabs
Some pages break without actual tab support, such as
https://breezewiki.com/ben10/wiki/Ultimatrix_(Original)#Modes

This change aims to work with old browsers (such as Firefox for Android 68)
and browsers with Javascript disabled (by showing all tab contents and hiding
the tab bar, i.e. how tabs work before this change).
2023-11-06 20:15:15 +11:00
b8ccd6cc3e
Improve theme layout on non-flex browsers 2023-10-03 18:54:07 +13:00
33591ce0a3
Add Minecraft to independent wikis 2023-09-26 00:51:55 +13:00
61d2820342
fix some more play buttons on minecraft wiki 2023-06-17 00:16:11 +12:00
4336e4ab43
fix javascript audio buttons on hearthstone wiki 2023-06-17 00:09:59 +12:00
f6933e9e50
expand all Warframe ability collapsibles 2023-06-16 23:05:30 +12:00
5 changed files with 44 additions and 2 deletions

2
.gitignore vendored
View file

@ -16,3 +16,5 @@ compiled
# Personal # Personal
/config.ini /config.ini
misc
storage

View file

@ -110,6 +110,15 @@
#;(curry attribute-maybe-update 'class #;(curry attribute-maybe-update 'class
(λ (class) (string-join (classlist-updater (string-split class " ")) " "))) (λ (class) (string-join (classlist-updater (string-split class " ")) " ")))
(curry attribute-maybe-update 'class class-updater) (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)
(string-prefix? (car (dict-ref v 'id)) "mw-customcollapsible")))
(λ (v) (dict-set v 'style "display:block")))
; change links to stay on the same wiki ; change links to stay on the same wiki
(curry attribute-maybe-update 'href (curry attribute-maybe-update 'href
(λ (href) (λ (href)
@ -245,6 +254,9 @@
; remove gamespot reviews/ads ; remove gamespot reviews/ads
[(has-class? "reviews" attributes) [(has-class? "reviews" attributes)
return-no-element] 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 [#t
(list element-type (list element-type
;; attributes ;; attributes

View file

@ -241,7 +241,7 @@
(div (@ (class "bw-ss__container") (id "bw-pr-search-suggestions")))) (div (@ (class "bw-ss__container") (id "bw-pr-search-suggestions"))))
(div (@ (class "bw-theme__select")) (div (@ (class "bw-theme__select"))
(span (@ (class "bw-theme__main-label")) "Page theme") (span (@ (class "bw-theme__main-label")) "Page theme")
(div (@ (class "bw-theme__items")) (span (@ (class "bw-theme__items"))
,@(for/list ([theme '(default light dark)]) ,@(for/list ([theme '(default light dark)])
(define class (define class
(if (equal? theme (user-cookies^-theme user-cookies)) (if (equal? theme (user-cookies^-theme user-cookies))
@ -252,7 +252,7 @@
req req
(struct-copy user-cookies^ user-cookies (struct-copy user-cookies^ user-cookies
[theme theme]))) (class ,class)) [theme theme]))) (class ,class))
(div (@ (class "bw-theme__icon-container")) (span (@ (class "bw-theme__icon-container"))
,(hash-ref theme-icons theme)) ,(hash-ref theme-icons theme))
,(format "~a" theme))))))) ,(format "~a" theme)))))))
(div (@ (id "content") #;(class "page-content")) (div (@ (id "content") #;(class "page-content"))

View file

@ -61,6 +61,16 @@
("Browser Extension" . "https://runescape.wiki/w/RuneScape:Finding_the_wikis_with_ease#Extensions")) ("Browser Extension" . "https://runescape.wiki/w/RuneScape:Finding_the_wikis_with_ease#Extensions"))
(λ (props) '())) (λ (props) '()))
'Minecraft
(extwiki-group^
"Minecraft"
'(("Post-Move FAQ" . "https://minecraft.wiki/w/Minecraft_Wiki:Moving_from_Fandom")
("Pre-Move Discussion" . "https://minecraft.fandom.com/wiki/Minecraft_Wiki:Moving_from_Fandom")
("In the media: PCGamer" . "https://www.pcgamer.com/official-minecraft-wiki-editors-so-furious-at-fandoms-degraded-functionality-and-popups-theyre-overwhelmingly-voting-to-leave-the-site/")
("In the media: PCGamesN" . "https://www.pcgamesn.com/minecraft/wiki-fandom"))
(λ (props)
'(p "The wiki was founded by Citricsquid on July 16th, 2009 as a way to document information from Minecraft. Since November 15th, 2010, it has been hosted by Curse Media. On December 12th, 2018, it moved to Fandom as it purchased Curse Media. Since September 24, 2023, it forked from Fandom and has been hosted by Weird Gloop.")))
'empty 'empty
(extwiki-group^ (extwiki-group^
"Misc" "Misc"
@ -400,6 +410,15 @@
`((p "“Fandom bought Gamepedia and forced a migration, with their restricted, ad-heavy appearance, and other annoying features that we could not remove, the wiki grew slow and annoying to use, especially for logged out users.") `((p "“Fandom bought Gamepedia and forced a migration, with their restricted, ad-heavy appearance, and other annoying features that we could not remove, the wiki grew slow and annoying to use, especially for logged out users.")
(p "“We decided to move away from Fandom to Wiki.gg, which returns the wiki to how it used to be on gamepedia, without the ads spamming and forced videos.”")))) (p "“We decided to move away from Fandom to Wiki.gg, which returns the wiki to how it used to be on gamepedia, without the ads spamming and forced videos.”"))))
(extwiki^
'("minecraft") 'default
'Minecraft
"The Minecraft Wiki"
"https://minecraft.wiki/w/Minecraft_Wiki"
"https://minecraft.wiki/images/Wiki.png"
(λ (props)
`()))
;; fandom wikinames * empty * empty * Name * Home Page ;; fandom wikinames * empty * empty * Name * Home Page
(extwiki^ '("aether") 'empty 'empty "Aether Wiki" "https://aether.wiki.gg/wiki/Aether_Wiki" #f #f) (extwiki^ '("aether") 'empty 'empty "Aether Wiki" "https://aether.wiki.gg/wiki/Aether_Wiki" #f #f)
(extwiki^ '("before-darkness-falls") 'empty 'empty "Before Darkness Falls Wiki" "https://beforedarknessfalls.wiki.gg/wiki/Before_Darkness_Falls_Wiki" #f #f) (extwiki^ '("before-darkness-falls") 'empty 'empty "Before Darkness Falls Wiki" "https://beforedarknessfalls.wiki.gg/wiki/Before_Darkness_Falls_Wiki" #f #f)

View file

@ -210,6 +210,14 @@ figcaption, .lightbox-caption, .thumbcaption {
display: block; display: block;
} }
/* 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 */ /* animated slots */
#mw-content-text .animated > :not(.animated-active), #mw-content-text .animated > .animated-subframe > :not(.animated-active) { #mw-content-text .animated > :not(.animated-active), #mw-content-text .animated > .animated-subframe > :not(.animated-active) {
display: inline-block; display: inline-block;
@ -324,6 +332,7 @@ figcaption, .lightbox-caption, .thumbcaption {
display: flex; display: flex;
} }
.bw-theme__item { .bw-theme__item {
display: inline-block;
display: flex; display: flex;
align-items: baseline; align-items: baseline;
padding: 2px; padding: 2px;