MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users browsing through any device */

/* Spoiler Alert */ importScriptPage('MediaWiki:SpoilerAlert.js'); /* Scripts run automatically on every page load */ $(window).load(function{   /* Inserts link to blogs in navigation bar */    $('.subnav-2').first.append('Blogs');    /* Moves Must Watch Videos at the bottom of the sidebar */    $('#WikiaRail').append($('#videosModule'));

/* Inserts module "Quick Links" above Recent Wiki Activity */ $('#WikiaRecentActivity').before('Quick Links Releases dates of anime, manga and other AoT related material? Check our Calendar .Questions, theories, something to discuss? Visit our Forum .Opinions, news, thoughts to share? Write a <a href="http://shingekinokyojin.wikia.com/wiki/Blog:Recent_posts">Blog Post</a> .</li>Suggestions, complaints or another doubt? Contact an <a href="http://shingekinokyojin.wikia.com/wiki/Shingeki_no_Kyojin_Wiki:Administrators">Administrator</a> .</li></ul> '); /* Inserts button "Reset spoiler preferences" below Recent Wiki Activity */ $('#WikiaRecentActivity').after(' Reset spoiler preferences '); $('#clearstorage').click(function {       localStorage.removeItem("spoilers");        location.reload;    }); $('#WikiaPageHeader').find('.wikia-menu-button').first.find('ul') .append('<a id="reset-spoilers" href="javascript:void(0)" title="Reset spoiler preferences">Hide spoilers</a></li>'); $('#reset-spoilers').click(function {       localStorage.removeItem("spoilers");        location.reload;    }); /* Inserts Facebook module above Chat */ $('.ChatModule').before('<section class="module" id="facebookmodule"><iframe style="border: 0; height: 231px; margin: 0; overflow: hidden; width: 268px;" src="https://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2FShingekiNoKyojinWiki&width=268&heightcolorscheme=light&show_faces=true&header=true&stream=false&show_border=true" scrolling="no" /> '); /* Moves HotSpot and Insights modules below Community Corner */ $('.CommunityCornerModule').after( $('.HotSpotsModule, .insights-module')); /* tabindex attribute for .status-row (necessary for the Articles status table) */ var x = document.getElementsByClassName("status-row"); var i;   for (i = 0; i < x.length; i++) { x[i].tabIndex = "0"; } }); /* Imported scripts */

/* User tags */ //Core configuration window.UserTagsJS = { modules: {}, tags: { bureaucrat: { u:'Bureaucrat', link: 'Project:Administrators', order: -5 },       sysop: { link: 'Project:Administrators', order: -4 },       rollback: { link: 'Project:Rollback users', order: -3 },       threadmoderator: { u:'Forum moderator', link:'Special:Forum', order: -2 },       chatmoderator: { link:'Special:Chat', order: -1 },       bot: { u:'Bot', link: 'Project:Task Board/Bot' }   } }; //  Adds users' MediaWiki groups to the internal group list UserTagsJS.modules.mwGroups = [ 'bureaucrat', 'sysop', 'rollback', 'threadmoderator', 'chatmoderator', 'bot' ]; // Removes certain groups UserTagsJS.modules.metafilter = { 'sysop': ['bot'] // Removes admin tag from all bots }; /* AutoEditDropdown */ window.AutoEditDropdownConfig = { expandedAreaContribute: true, expandedAreaEdit: true }; /* Auto Refresh */ AjaxRCRefreshText = 'Auto-Refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = [ 'Special:WikiActivity', 'Special:RecentChanges', 'Special:Log', ];

/* List of imports */ importArticles({   type: 'script',    articles: [        // ...        'w:c:dev:UserTags/code.js', // User tags        'u:dev:AjaxRC/code.js', // Auto Refresh        'u:dev:ReferencePopups/code.js', // Displays content of references on hover        'u:dev:Countdown/code.js', // Countdown clock        'u:dev:BackToTopButton/code.js', // Adds "Back to top" button in pages        'u:dev:DupImageList/code.js', // Creates list of duplicate images and videos        'u:dev:View_Source/code.js', // Adds "view source" link to edit dropdown        'u:dev:PurgeButton/code.js', // Adds "refresh" link to edit dropdown        'u:dev:RevealAnonIP/code.js', // Replaces "a wikia contributor" with IP address        'u:dev:AutoEditDropdown/code.js', // Automatically opens edit menu on hover    ] });