User:KurwaAntics/global.js

// Import script files // importArticles({   type: "script",    articles: [        "w:c:dev:DisplayClock/code.js",        "w:c:dev:ReferencePopups/code.js",        "w:c:dev:FindAndReplace/code.js",        "w:c:dev:RevealAnonIP/usercode.js",        "w:c:dev:MediaWiki:YouTubeModal/code.js"    ] });

// Edit wiki navigation // $(".WikiHeader div.buttons").append(   ' '+    '  Edit wiki navigation'+    '  ' );

// Background color brightness // var bgColor = $('#WikiaPageBackground').css('background-color'); if ('transparent' == bgColor) bgColor = $('#WikiaPage').css('background-color'); if ('transparent' == bgColor) bgColor = $('#EditPageHeader').css('background-color'); var color = bgColor; function isBright (color) { var m = color.match(/(?:([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2}))|(?:(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3}))/); if (!m) return false; var rgb = m[1] ? { r: parseInt(m[1], 16), g: parseInt(m[2], 16), b: parseInt(m[3], 16) } : { r: parseInt(m[4], 10), g: parseInt(m[5], 10), b: parseInt(m[6], 10) }; return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000 >= 128; } if(isBright (color)===false) { $("#WikiaRail").show.css({"background":"#222", "color":"#ccc"}); } else { $("#WikiaRail").show; }

console.log( wgPageName + ' loaded.' );