User:KurwaAntics/global.js

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"    ] });

var x = (window.location.href.indexOf('?') > -1) ? '&' : '?';

$('body').prepend(' '+ ' '+wgPageName.replace(/_/g, " ")+' '+ ''+ ''+ ''+ 'Source'+ ''+ ''+ ''+ ''+ ''+ 'New section</li>'+ '<a href="' + $("#ca-history").attr("href") + '"class="page-actions history">History</li>'+ '<a href="' + $(".wikia-button.comments.secondary").attr("href") + '" class="page-actions talk-comments">Talk</li>'+ '<a href="' + $("#ca-move").attr("href") + '" class="page-actions move">Move</li>'+ '<a href="' + $("#ca-protect").attr("href") + '" class="page-actions protect">Protect</li>'+ '<a href="' + $("#ca-unprotect").attr("href") + '" class="page-actions unprotect">Change protection</li>'+ '<a href="' + $("#ca-delete").attr("href") + '" class="page-actions delete">Delete</li>'+ '</ul>'+ '</li>'+ '<a class="va-icon fa fa-user" title="My user page" href="' + $("a[data-id=userpage]").attr("href") + '"></a>'+ '<ul class="va-list">'+ '<a href="/wiki/Message_Wall:Yhynerson1">Talk</a></li>'+ '<a href="/wiki/User_blog:Yhynerson1">Blog</a></li>'+ '<a href="/wiki/Special:Contributions/Yhynerson1">Contributions</a></li>'+ '<a href="/wiki/Special:AdminDashboard?tab=advanced" class="admin">Admin dashboard</a></li>'+ '</ul>'+ '</li>'+ '<a class="va-icon fa fa-cog" title="Settings and notifications" href="/wiki/Special:Preferences"></a></li>'+ '<a class="va-icon fa fa-upload" title="Upload" href="/wiki/Special:Upload"></a></li>'+ ''+ '<a class="va-icon" title="Edit CSS pages"><small style="font-family:roboto; font-weight:300; line-height:normal">CSS </a>'+ '<ul class="va-list">'+ '<a class="admin" href="/wiki/MediaWiki:Wikia.css?action=edit">This wiki</a></li>'+ '<a href="/wiki/User:Yhynerson1/wikia.css?action=edit">Personal</a></li>'+ '<li><a href="http://community.wikia.com/wiki/User:Yhynerson1/global.css?action=edit">Global</a></li>'+ '</ul>'+ '</li>'+ '<li>'+ '<a class="va-icon" title="Edit JavaScript pages"><small style="font-family:roboto; font-weight:300; line-height:normal">JS </a>'+ '<ul class="va-list">'+ '<li><a class="admin" href="/wiki/MediaWiki:Common.js?action=edit">This wiki</a></li>'+ '<li><a href="/wiki/User:Yhynerson1/common.js?action=edit">Personal</a></li>'+ '<li><a href="http://community.wikia.com/wiki/User:Yhynerson1/global.js?action=edit">Global</a></li>'+ '<li><a class="admin" href="/wiki/MediaWiki:ImportJS?action=edit">List of imports</a></li>'+ '<li><a class="admin" href="/wiki/Special:JSPages">Review status</li>'+ '<li><a href="' + window.location.href + x + 'debug=true">Debug</a></li>'+ '</ul>'+ '</li>'+ '<li>'+ '<a class="va-icon fa fa-refresh refresh" title="Refresh"></a>'+ '<ul class="va-list">'+ '<li><a href="' + window.location.href + x + 'action=purge">Purge</a></li>'+ '<li><a class="hard-refresh">Clear cache</a></li>'+ '</ul>'+ '</li>'+ '<li style="float: right">'+ '<form name="searchbox" id="searchbox" class="searchbox" action="/wiki/Special:Search">'+ '<input class="searchboxInput" name="search" type="text" placeholder="Search..." autocomplete="off"> '+ '</li>'+ '</ul>'+ ' ');

if( $("#ca-edit").attr("href")===undefined){ $('.edit-page').removeClass('fa-pencil').addClass('fa-code').addClass('mini-edit').removeAttr('href'); $('.va-list .mini-edit').remove; } if( $(".wikia-button.comments.secondary").attr("href")===undefined) $(".talk-comments").remove; if( $("#ca-addsection").attr("href")===undefined) $(".new-section").remove; if( $("#ca-history").attr("href")===undefined) $(".history").remove; if( $("#ca-move").attr("href")===undefined) $(".move").remove; if( $("#ca-protect").attr("href")===undefined) $(".protect").remove; if( $("#ca-unprotect").attr("href")===undefined) $(".unprotect").remove; if( $("#ca-delete").attr("href")===undefined) $(".delete").remove; if( $("a[data-id=wikinavedit]").attr("href")===undefined) $(".wiki-nav-edit").remove; if( $("a[data-name=themedesigner]").attr("href")===undefined) $(".admin").remove; if( window.location.href.indexOf('Message_Wall:') > -1 || window.location.href.indexOf('Thread:') > -1 || window.location.href.indexOf('Special:') > -1 || window.location.href.indexOf('User_blog:') > -1 || window.location.href.indexOf('action=edit') > -1 ) $('.view-source, .page-actions').remove;

$('.mini-edit').toggle(function {	$('body').prepend(' ');	$('.source-window').load(window.location.href + x + 'action=edit #wpTextbox1',function { $("#wpTextbox1").prop('disabled', true); }); }, function {	$('.source-window').remove; });

$('.refresh').on('click', function{   location.reload; });

$('.hard-refresh').on('click', function{   location.reload(true); });

console.log('Taskbar loaded.');