Jump to content

MediaWiki:Common.js: Difference between revisions

From CasinoLeaks
Footer: rename to Team and experts
Footer links via index.php (clean /wiki/ URLs currently 404)
Line 8: Line 8:
var li = document.createElement( 'li' ), a = document.createElement( 'a' );
var li = document.createElement( 'li' ), a = document.createElement( 'a' );
li.setAttribute( 'data-trust-links', '1' );
li.setAttribute( 'data-trust-links', '1' );
a.href = mw.util.getUrl( item[ 1 ] );
a.href = mw.config.get( 'wgScript' ) + '?title=' + encodeURIComponent( item[ 1 ] );
a.textContent = item[ 0 ];
a.textContent = item[ 0 ];
li.appendChild( a );
li.appendChild( a );

Revision as of 19:54, 5 November 2026

/* Footer links to the trust pages (CURACAOFIL-6). Owner-authorised 2026-11-05. */
mw.hook( 'wikipage.content' ).add( function () {
	var places = document.getElementById( 'footer-places' );
	if ( !places || places.querySelector( '[data-trust-links]' ) ) {
		return;
	}
	[ [ 'Methodology', 'CasinoLeaks:Methodology' ], [ 'Corrections policy', 'CasinoLeaks:Corrections_policy' ], [ 'Team and experts', 'CasinoLeaks:Team_and_experts' ], [ 'Contact', 'CasinoLeaks:Contact' ] ].forEach( function ( item ) {
		var li = document.createElement( 'li' ), a = document.createElement( 'a' );
		li.setAttribute( 'data-trust-links', '1' );
		a.href = mw.config.get( 'wgScript' ) + '?title=' + encodeURIComponent( item[ 1 ] );
		a.textContent = item[ 0 ];
		li.appendChild( a );
		places.appendChild( li );
	} );
} );