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 {

var rv, s , c , v , aSTD , TranslationJSON , TranslationKeys , CTHeader , $event , $error , $data , $status ; const PageSelector = ' #content '; const ColorList = ' #ColorList '; $.get('https://dev.fandom.com/wiki/MediaWiki:Custom-FD-CSS-VList/i18n.json?action=raw&ctype=text/javascript', function ($data,$status){ TranslationJSON = $data; CTHeader = mw.config.get('wgUserLanguage') + ': ' + toString(TranslationJSON);

$('.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; });

});