MediaWiki:Common.js
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.
/* 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' ], [ 'Sources and coverage', 'CasinoLeaks:Sources_and_coverage' ], [ 'Corrections policy', 'CasinoLeaks:Corrections_policy' ], [ 'Editorial standards', 'CasinoLeaks:Editorial_standards' ], [ '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 );
} );
} );
/* 18+ notice and independent help resources in the footer (CURACAOFIL-6) */
mw.hook( 'wikipage.content' ).add( function () {
var footer = document.querySelector( 'footer' ) || document.getElementById( 'footer' );
if ( !footer || footer.querySelector( '.cl-rg' ) ) {
return;
}
var box = document.createElement( 'div' );
box.className = 'cl-rg';
box.style.cssText = 'margin:0 0 1em;padding:.7em 1em;border:1px solid #c8ccd1;background:#f8f9fa;font-size:.9em;line-height:1.5';
var links = [ [ 'GambleAware', 'https://www.gambleaware.org' ], [ 'GamCare', 'https://www.gamcare.org.uk' ], [ 'GAMSTOP', 'https://www.gamstop.co.uk' ], [ 'Gambling Therapy', 'https://gamblingtherapy.org' ], [ 'NCPG', 'https://www.ncpgambling.org' ] ];
var b = document.createElement( 'strong' );
b.textContent = '18+ ';
box.appendChild( b );
box.appendChild( document.createTextNode( 'Gambling can be addictive. This site is for information only and is not an invitation to gamble. Need help? ' ) );
links.forEach( function ( l, i ) {
var a = document.createElement( 'a' );
a.href = l[ 1 ]; a.textContent = l[ 0 ]; a.rel = 'noopener nofollow'; a.target = '_blank';
box.appendChild( a );
box.appendChild( document.createTextNode( i < links.length - 1 ? ' · ' : ' · ' ) );
} );
var more = document.createElement( 'a' );
more.href = mw.config.get( 'wgScript' ) + '?title=CasinoLeaks:Get_help'; more.textContent = 'More help';
box.appendChild( more );
footer.insertBefore( box, footer.firstChild );
} );