×
Create a new article
Write your page title here:
We currently have 69 articles on Super Shiritori Wiki. Type your article name above or click on one of the titles below and start writing!



Super Shiritori Wiki
Revision as of 05:18, 5 September 2026 by The CodeGhost (talk | contribs) (Add infobox gallery tab-switching and mobile infobox reordering (below lead paragraph, Wikipedia-style))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Welcome to Super-Shiritori!

Please remember:

  • No vandalism – Do not add nonsense, false info, spam, or blank pages.
  • Respect others – Be polite and assume good faith.
  • Use reliable information – Make sure edits are accurate and IMPORTANT.
  • Stay constructive – Help us grow the wiki with content, especially with the Word compendium.

⚠️ Repeated vandalism or rule-breaking may result in warnings or blocks. If you see vandalism, please revert it and notify an admin.

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Behavior for Template:Infobox_application. Lives in Common.js (not
 * Cosmos.js) so it keeps working regardless of which skin a reader/editor
 * has selected. */
( function () {

	// Clickable tab bar for multi-image infoboxes (image1/caption1,
	// image2/caption2, ...). Without this, only the first <div data-ia-slide>
	// is visible -- everything still renders, it just can't be switched.
	function initInfoboxGalleries() {
		document.querySelectorAll( '.infobox-application__gallery' ).forEach( function ( gallery ) {
			var tabs = gallery.querySelectorAll( '.infobox-application__gallery-tab' );
			var slides = gallery.querySelectorAll( '.infobox-application__gallery-slide' );
			tabs.forEach( function ( tab ) {
				tab.addEventListener( 'click', function () {
					var index = tab.getAttribute( 'data-ia-tab' );
					tabs.forEach( function ( t ) {
						t.classList.toggle( 'is-active', t === tab );
					} );
					slides.forEach( function ( slide ) {
						slide.hidden = slide.getAttribute( 'data-ia-slide' ) !== index;
					} );
				} );
			} );
		} );
	}

	// On narrow screens the infobox drops its desktop float (see
	// Template:Infobox_application/styles.css) and becomes a full-width
	// block -- but it's still first in the wikitext/DOM, so without this it
	// would render ABOVE the lead paragraph instead of below it, the way
	// Wikipedia's mobile view places infoboxes. This moves it to just after
	// the first non-empty paragraph of the article (mirrors MobileFrontend's
	// own behavior, which Cosmos doesn't have).
	function relocateInfoboxOnMobile() {
		if ( window.innerWidth > 550 ) {
			return;
		}
		document.querySelectorAll( '.mw-parser-output > .infobox-application' ).forEach( function ( box ) {
			var sib = box.nextElementSibling;
			while ( sib && ( sib.tagName !== 'P' || !sib.textContent.trim() ) ) {
				sib = sib.nextElementSibling;
			}
			if ( sib ) {
				sib.insertAdjacentElement( 'afterend', box );
			}
		} );
	}

	function init() {
		initInfoboxGalleries();
		relocateInfoboxOnMobile();
	}

	if ( document.readyState === 'loading' ) {
		document.addEventListener( 'DOMContentLoaded', init );
	} else {
		init();
	}
}() );