Compare commits

...

2 Commits

Author SHA1 Message Date
blankie 0e2b5ea452
Hide slideshows 2023-11-13 14:36:20 +11:00
blankie 2b3a8fe108
Fix scrolling to sections if a tab's hash coincides with one
ben10/wiki/Alien_X_(Classic)#Appearances
2023-11-13 14:35:35 +11:00
2 changed files with 11 additions and 1 deletions

View File

@ -218,6 +218,13 @@ a.ext-audiobutton { /* see hearthstone/wiki/Diablo_(Duels_hero) */
display: inline !important;
}
/* hide slideshows since they're broken
* example: ben10/wiki/Celestialsapien_(Classic)#Powers_and_Abilities
*/
.wikia-slideshow {
display: none;
}
/* animated slots */
#mw-content-text .animated > :not(.animated-active), #mw-content-text .animated > .animated-subframe > :not(.animated-active) {
display: inline-block;

View File

@ -66,6 +66,9 @@ function setCurrentTab(tabber, tab, content) {
tab.classList.add("wds-is-current");
content.classList.add("wds-is-current");
if (tab.dataset.hash) {
location.hash = "#" + tab.dataset.hash;
let fragment = "#" + tab.dataset.hash;
if (location.hash !== fragment) {
history.pushState(null, "", fragment);
}
}
}