User:RyaNayR/global.js

///* ChatRefresh // *  By IAmAPersson ( http://community.wikia.com/wiki/User:IAmAPersson ) // * Original release date: January 20, 2014 // */ // //console.log('ChatRefresh: Init.'); //if (refreshTime === 0) { //   var refreshTime = 300000; //   alert('ChatRefresh: Setting refreshTime = 300000'); //} // //if (wgCanonicalSpecialPageName === 'Chat') { //   console.log('ChatRefresh: Chat namespace detected.'); //   setInterval(function { //            alert('ChatRefresh: Attempting to clear chat window.'); //            active.clearWindow; //        }, refreshTime //    ); //}

/********************/

var toolbarCSS = mw.util.addCSS('.WikiaBarWrapper{background:linear-gradient(to bottom,#3264af 25%,#00327d 50%,#00194b 75%)}.WikiaBarWrapper .toolbar .tools li a{color:#0ff;font-weight:700}.WikiaBarWrapper .tools-menu{background:linear-gradient(#000064,#6496ff,#000064) repeat scroll 0 0 transparent;border-radius:8px;border:2px solid silver;min-width:90px;text-align:center}.WikiaBarWrapper .toolbar .tools .arrow-icon{border-color:transparent transparent lime}'), toolbarCSS1 = mw.util.addCSS('.WikiaBarWrapper a{transition:color 500ms ease-in-out!important}'), tpwCSS     = mw.util.addCSS('.WikiaHeader .page-width-container,.WikiaPage,.WikiaMainContentContainer{margin:0}.WikiaRail{display:none}body.skin-oasis>.global-notification,.WikiaHeader .page-width-container,.WikiaPage{max-width:100%;width:100%}'), modalCSS   = mw.util.addCSS('.modal.large{width:calc(100% - 320px)}'), tctDefault = true;

function togglePageWidth { tpwCSS.disabled = !tpwCSS.disabled; } function toggleModalWidth { modalCSS.disabled = !modalCSS.disabled; console.log('toggleModalWidth: Success!'); } function toggleCustomToolbar { toolbarCSS.disabled = !toolbarCSS.disabled; }

$('#WikiaBarWrapper .toolbar > .tools').append('Toggle Page Width'); $('#WikiaBarWrapper .toolbar > .tools').append('Toggle Custom Toolbar ');

$(document).on('DOMNodeInserted', function (e) {   if (e.target.id === 'wikiDiff') {        $('.modal > header > h3').append('Toggle Width ');    } });

togglePageWidth; if (!tctDefault) { toggleCustomToolbar; }

/*** toggleAds ***/ var adsVisible = true; mw.util.addCSS('#ToggleAds-checkbox{margin:0 4px 0 0;position:relative;top:2px}');

$('.toolbar .tools').append('Hide ads '); $('#ToggleAds-checkbox').prop('checked', true); $('#ToggleAds-checkbox').change( toggleAds );

function hideAds { $('.home-top-right-ads, .WikiaTopAds').hide; adsVisible = false; } function showAds { $('.home-top-right-ads, .WikiaTopAds').show; adsVisible = true; } function toggleAds { if ( $('#ToggleAds-checkbox').prop('checked') && adsVisible ) { hideAds; $('#ToggleAds-checkbox').prop('checked', true); } else { showAds; $('#ToggleAds-checkbox').prop('checked', false); } }

/********************/

window.DisplayClockJS = { hoverText: '', interval: 200, monofonts: 'Consolas, monospace', location: 'global' };

importArticles({   type: 'script',    articles: [        'u:community:User:RyaNayR/Code/code.js',        'u:dev:AutoEditDropdown/code.js',        'u:dev:QQX/code.js',        'u:dev:PortableCSSPad/code.js',        'u:dev:View_Source/code.js',        'u:dev:HeaderLinks/code.js',        'u:dev:UnsafeScripts/personal.js'            //:community:User:RyaNayR/CustomToolbarToggle.js',            //'u:community:User:RyaNayR/Code/code.js',            //'u:dev:MiniComplete/code.js',            //'u:dev:QuickTools/advanced.js',            //'u:dev:ListFiles/code.js',            //'u:dev:HideRail/code.js',            //'u:dev:DisplayClock/code.js'    ] });