User:Ultimate Dark Carnage/wikia.js

/*function configureEl(el, class_name, attribute, attr_val, refElem){ var elem = document.createElement(el); elem.setAttribute('class', class_name); elem.setAttribute(attribute, attr_val); refElem.append(elem); }

var element = {}; element.elname = 'a'; element.classname = 'wikia-button'; element.attrib = 'href'; element.attribval = 'javascript:openTestWindow;'; element.refElem = $('.WikiaHeader .tally');

configureEl(element.elname, element.classname, element.attrib, element.attribval, element.refElem);

function openTestWindow{ $.showCustomModal('Test Form',         '' +              ' ' +                  '' +                      ' ' +                          '' +                              '' +                          '' +                          '' +                              '' +                                  '' +                              '' +                              '' +                                  '' +                                      'Test' + '' + '' + 'Hello World</a>' + '</li>' + '</ul>' + '</li>' + '</ul>' + ' ' +                 ' ' +              ' ' +          ' '); }*/

function addNewLinks(link, link_title){ var l = '<a href="' + link + '">' + link_title + '</a></li>'; $('.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'); }

addOnloadHook(insertLinks);

function addAccountNavigationLinks(link, link_title){ var l = '<a href="' + link + '">' + link_title + '</a></li>'; $('#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 = '<a href="' + link + '" class="wikia-button wikia-single-button">' + button_message + '</a> '; $('#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('<a href="' + tab_links.tablocation + '">' + tab_links.title + '</a></li>'); }

function configure(value){ if (value === "true"){ addTab('/wiki/User:Ultimate Dark Carnage/Sandbox', 'Sandbox', 'sandbox'); addTab('/wiki/Special:Editcount/Ultimate Dark Carnage', 'Editcount', 'editcount'); } }

configure("true");

/*function addSideMenu{ var user_split = wgUserName.split(' ').join('_'); var menuHTML = '<aside class="side-menu" id="side-menu">' + '<section class="side-menu-navigation" id="side-menu-navigation">' + '<nav class="side-menu-top-buttons" id="side-menu-top-buttons">' + '<button class="close wikia-chiclet-button">' + ' ' +                   '<button class="maximize wikia-chiclet-button">' + ' ' +               ' ' +                '<header class="side-menu-header" id="side-menu-header">' + ' Side Menu ' + ' ' +               '<ul class="side-menu-nav-items">' + '' + '<a href="?action=edit">Edit</a>' + '</li>' + '' + '<a href="?action=purge">Purge</a>' + '</li>' + '' + '<a href="?action=history">History</a>' + '</li>' + '' + '<a href="/wiki/User:' + user_split + '">Profile</a>' + '</li>' + '</ul>' + ' ' +       ' '; }*/