User:KurwaAntics/global.js

/*
 * Relocate Edit Discussion Buttons
 * @description Relocate edit and discuss buttons back to their former places.
 * @author Ozuzanna
 * (function($, mw) {

/* Clone the existing elements */ var editButton = $('nav.wikia-menu-button:nth-child(2)').clone(true,true); if ($('.comments').length) var discussionButton = $('.comments').first.clone(true,true); /* Remove line break after doing everything else if needed */ if ($('#WikiaPageHeader > br:nth-child(2)').length) $('#WikiaPageHeader > br:nth-child(2)').remove; /* Remove the old buttons and reposition them where they were before*/ $('nav.wikia-menu-button:nth-child(2)').remove; if ($('.comments').length) { $('.comments').first.remove; $('.header-column:nth-child(1) > h1:nth-child(1)').after(discussionButton); }   $('.header-column:nth-child(1) > h1:nth-child(1)').after(editButton); /* Add spacing between the buttons if the talk one is visible */ if ($('.comments').length) $('a.wikia-button:nth-child(3)').before('   '); }) (this.jQuery, this.mediaWiki); //

/* Make Visual Editor links load the regular editor instead */ if ($.getUrlVar('veaction') == 'edit') location.replace(document.URL.replace('veaction','action'));

/* Revert to old Wikia Activity Module */ if ($('#WikiaRail').length) { $('#WikiaRail').on('DOMNodeInserted', function {   $(this).removeClass('wikia-rail');   }); }

window.monoBookText = "Switch to Monobook";

importArticles({   type: "script",    articles: [        "w:c:dev:View_Source/code.js",        "w:c:dev:DisplayClock/code.js",        "w:c:dev:ReferencePopups/code.js",        "w:c:dev:FindAndReplace/code.js",        "w:c:dev:SkinSwitchButton/code.js",        "w:c:dev:RevealAnonIP/code.js"    ] }, {    type: "style",    articles: [        "w:c:dev:DropdownMenu/code.css",        "w:c:dev:FontAwesome/code.css"    ] });