User:DSquirrelGM/global.js

$('.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 {

var rv, s , c , v , aSTD , CTHeader , $event , $error ; const PageSelector = ' #content '; const ColorList = ' #ColorList ';

mw.loader.getScript('https://dev.fandom.com/wiki/MediaWiki:I18n-js/code.js').done(function { window.dev.i18n.loadMessages('FD-CSS-VList').done(function (rv){

CTHeader = rv.msg('CTHeader').escape;

$('.page-header__actions').prepend( '  ' + CTHeader + ' );

$(PageSelector).prepend( '' + CTHeader + ' ' );

$(ColorList).toggle;

/* 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

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

s = window.getComputedStyle(document.body).item(i); c = window.getComputedStyle(document.body).getPropertyValue(s); v = $( '' + s + ': ' + c + '; ' );

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

v.css( 'word-wrap', 'break-word' ); v.css( 'overflow', 'wrap' ); v.css( 'background', 'transparent ' + c + ' left top / cover' );

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

v.css( 'color', 'rgb(var(' + s + '));' );

} else {

v.css( 'color', 'var(' + s + ');' );

}

$(ColorList).append(v);

}

});});

$( '#FDCVToggle' ).click( function { $(ColorList).toggle; });

});