User:DSquirrelGM/global.js

( function { $('.mw-highlight').removeClass('mw-highlight'); if (mw.config.get('wgAction') === 'delete') { $('#wpReason').removeAttr('value'); } });

//mw.loader.load( 'https://dev.fandom.com/wiki/MediaWiki:FD-CSS-VList.js?action=raw&ctype=text/javascript' ); ( function {

const PageSelector = ' #content .mw-parser-output '; const ColorList = PageSelector + ' #ColorList '; var s, c , d , v , r , rv , aSTD , ULanguage ;

if ( $( ColorList ).length > 0 ) { return; }

$( PageSelector ).prepend( '                ' );

//style setting iteration / filters //assumes CSS variable setting intent based on name: //--*-image: background image url //--*--rgb: color value triplet for rgb / rgba //--*: any other variable assumed to represent color

$( 'link[rel="stylesheet"]' ).each(function (r,v) { $( '#StyleBuffer' ).append('  '); $( '#StyleBuffer_' + r ).load( $(this).attr('href') ); });

for ( i = 0 ; i < window.getComputedStyle(document.body).length ; i++ ) {

s = window.getComputedStyle(document.body).item(i);

c = window.getComputedStyle(document.body).getPropertyValue(s);

if ( s.startsWith( '--' ) ) {

if ( s.includes( '-image' ) ) {

$( ColorList ).append( '' + s + ': ' + c + '; ' );

} else if ( s.endsWith( '--rgb' ) ) {

$( ColorList ).append( '' + s + ': ' + c + '; ' );

} else {

$( ColorList ).append( '' + s + ': ' + c + '; ' );

} } }

$('#FDCVToggle').click( function( $event ){

if ( $( ColorList ).css('display') == 'none' ) { $( ColorList ).css('display', 'block'); } else { $( ColorList ).css('display', 'none'); }

} );

} );