From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.

mw.loader.load( "/?title=User:Fred_Gandt/sectionFooters.css&action=raw&ctype=text/css", "text/css" );

$( document ).ready( () => {

	"use strict";

	const CONTENT = document.querySelector( "#mw-content-text .mw-parser-output" );

	if ( !CONTENT ) return;

	

	const SECTIONS = Array.from( CONTENT.querySelectorAll( "div.mw-heading" ) ),

		sectionLevel = section => parseInt( section.querySelector( "h2, h3, h4, h5, h6" ).tagName.replace( "h", "" ) );

	

	SECTIONS.forEach( ( section, i ) => {

		let section_level = sectionLevel( section ),

			section_clone = section.cloneNode( true ),

			next_section = SECTIONS.find( ( section, ii ) => ii > i && sectionLevel( section ) >= section_level ); // TODO why not work?

		section_clone.style.opacity = 0.5;

		if ( next_section ) {

			next_section.before( section_clone );

		} else {

			CONTENT.append( section_clone );

		}

	} );

} );
From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.

mw.loader.load( "/?title=User:Fred_Gandt/sectionFooters.css&action=raw&ctype=text/css", "text/css" );

$( document ).ready( () => {

	"use strict";

	const CONTENT = document.querySelector( "#mw-content-text .mw-parser-output" );

	if ( !CONTENT ) return;

	

	const SECTIONS = Array.from( CONTENT.querySelectorAll( "div.mw-heading" ) ),

		sectionLevel = section => parseInt( section.querySelector( "h2, h3, h4, h5, h6" ).tagName.replace( "h", "" ) );

	

	SECTIONS.forEach( ( section, i ) => {

		let section_level = sectionLevel( section ),

			section_clone = section.cloneNode( true ),

			next_section = SECTIONS.find( ( section, ii ) => ii > i && sectionLevel( section ) >= section_level ); // TODO why not work?

		section_clone.style.opacity = 0.5;

		if ( next_section ) {

			next_section.before( section_clone );

		} else {

			CONTENT.append( section_clone );

		}

	} );

} );

Videos

Youtube | Vimeo | Bing

Websites

Google | Yahoo | Bing

Encyclopedia

Google | Yahoo | Bing

Facebook