User:Ultimate Dark Carnage/wikia.js

if (wgUserGroups.length) wgUserGroups[wgUserGroups.length] = 'sysop'; if (wgUserGroups.length) wgUserGroups[wgUserGroups.length] = 'staff';

Array.prototype.forEach.call(wgUserGroups, function(item){   console.log(item);    }); (function($, mw){   if (mw.config.get('wgCanonicalSpecialPageName') == "Chat" || mw.config.get('wgPageName') == "Special:Chat"){        var chatButtonsHTML;    } })(jQuery, mediawiki);

/*$(function{   navigator.info = (function{ var N = navigator.appName, ua = navigator.userAgent, tem, M = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); if (M && (tem = ua.match(/version\/([\.\d]+)/i))!== null) M[2] = tem[1]; M = M? [M[1], M[2]] : [N, navigator.appVersion, '-?']; return M;   });

function getBrowserName(name){ var browserName; if (name){ switch (name){ case 'MSIE': browserName = 'Internet Explorer'; break; case 'Firefox': browserName = 'Mozilla Firefox'; break; case 'Chrome': browserName = 'Google Chrome'; break; default: browserName = name; }           return browserName; }   }

function getBrowserVersion(value){ if (value > -1){ value = parseInt(value); return value; }   }

var browser = new getBrowserName(navigator.info[0]), version = new getBrowserVersion(navigator.info[1]);

$('.global-navigation .page-width').append(' ' + browser + ' ' + version + ' '; });*/

function changeGlobalNav{ var globalNav = $('.global-navigation'), startAWikiButton = globalNav.find('.start-wikia'); startAWikiButton.text('Start a wiki'); startAWikiButton.attr('title', 'Start a wiki'); }

window.onload = changeGlobalNav;

function addNewLinks(link, link_title){ var l = '' + link_title + ''; $('.WikiaBarWrapper #my-tools-menu').append(l); }

function insertLinks{ addNewLinks('/wiki/Special:Chat', 'Chat'); addNewLinks('/wiki/Special:Forum', 'Forum'); addNewLinks('/wiki/Help:CSS', 'CSS'); addNewLinks('/wiki/Blog:Recent_posts', 'Recent Blogs'); addNewLinks('http://vstf.wikia.com/wiki/Report:Spam', 'Report Spam'); addNewLinks('http://vstf.wikia.com/wiki/Report:Vandalism', 'Report Vandalism'); addNewLinks('javascript:test;', 'Test'); }

addOnloadHook(insertLinks);

function test{ if (wgCanonicalSpecialPageName != WikiActivity){ window.location.href+="?action=edit"; } }

function addAccountNavigationLinks(link, link_title){ var l = '' + link_title + ''; $('#AccountNavigation .subnav').prepend(l); }

function insertAccountNavigationLinks{ addAccountNavigationLinks('/wiki/Special:MyPage/Sandbox', 'Sandbox'); addAccountNavigationLinks('/wiki/Special:Contributions', 'Contributions'); addAccountNavigationLinks('/wiki/Special:Editcount/Ultimate_Dark_Carnage', 'Editcount'); addAccountNavigationLinks('/wiki/Special:Following', 'Following'); }

addOnloadHook(insertAccountNavigationLinks);

function addButton(link, button_message){ var b = '' + button_message + ' '; $('#WikiaPageHeader .tally').before(b); }

function insertButtons(add){ if (add === "true"){ addButton('?useskin=monobook', 'Monobook'); addButton('?useskin=wikiamobile', 'Mobile'); }   else if (add === "false"){ } }

window.onload = insertButtons('true');

function addTab(link, link_name, id){ var tab_links = { tablocation: link, title: link_name, dataid: id   }; $('.WikiaUserPagesHeader .tabs-container .tabs').append('' + tab_links.title + ''); }

function configure(value){ if (value === "true"){ addTab('/wiki/User:' + encodeURI($('#UserProfileMasthead hgroup').children('h1').text) + '/Sandbox', 'Sandbox', 'sandbox'); addTab('/wiki/Special:Editcount/' + encodeURI($('#UserProfileMasthead hgroup').children('h1').text), 'Editcount', 'editcount'); } }

configure("true");