User:C.Syde65/global.js

AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges", "Special:WikiActivity"];

window.UserTagsJS = { modules: { inactive: 62, newuser: true, autoconfirmed: true, mwGroups: [ 'bureaucrat', 'sysop', 'assistant', 'rollback', 'chatmoderator', 'bannedfromchat' ]   },    tags: { assistant: 'Assistant', threadmoderator: 'Discussions Moderator', 'content-moderator': 'Content Moderator' },   oasisPlaceBefore: '' };

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:ChatHacks.js',        'u:dev:MediaWiki:EditIntroButton/code.js',        'u:dev:MediaWiki:AjaxRC/code.js',        'u:dev:MediaWiki:PurgeButton/code.js',        'u:dev:MediaWiki:UserTags/code.js',        'u:dev:MediaWiki:RevealAnonIP/code.js',        'u:dev:MediaWiki:Nuke/code.js',        'u:dev:MediaWiki:ExpandGlobalNavDropdownsOnHover/code.js'    ] });

/*
 * Rollback
 * Perform rollbacks without needing to be in the usergroup
 * @author Ozuzanna

var main = { init: function { //check if user has rollback permission already var userGroups = ["rollback","content-moderator","assistant","sysop","vstf","helper","staff"], ownGroups = mw.config.get('wgUserGroups'), hasPermissionAlready = false; for (var i in ownGroups) { if (userGroups.indexOf(ownGroups[i]) !== -1) { hasPermissionAlready = true; break; }		}		if (hasPermissionAlready) return; if (mw.config.get('wgAction') == "history" && $('#pagehistory li').length > 1) $('#pagehistory li:first .mw-history-undo a').before(' rollback | '); else if (mw.config.get('wgCanonicalSpecialPageName') == "Contributions") { $('#mw-content-text ul').find('li').each(function {				if ($(this).find('.mw-uctop').length)					$(this).append(' [rollback] ');			}); }		else if (($.getUrlVar('diff') || $.getUrlVar('oldid')) && $('#differences-nextlink').length == 0) $('.mw-usertoollinks:last').after('   [rollback] '); $('.mw-custom-rollback-link a').click(function {			main.getRevisionIdAndContent($(this).attr('data-id'));		}); },	getRevisionIdAndContent: function(title) { var API = new mw.Api; API.get({		action: 'query',		prop: 'revisions',		titles: title,		rvprop: 'user|ids',		rvlimit: 500,		cb: new Date.getTime		}) .done(function(d) {			if (!d.error) {				var revisions;				for (var i in d.query.pages) {					revisions = d.query.pages[i].revisions;				}				var currentUser = revisions[0].user, //current user rollbacking from				lastUser,				revId;				for (var i in revisions) {					if (revisions[i].user != currentUser) {						lastUser = revisions[i].user; //remember last author						revId = revisions[i].revid; //get revision to revert to						break;					}				}				if (lastUser) {					API.get({ action: 'query', prop: 'revisions', rvprop: 'content', revids: revId, cb: new Date.getTime })					.done(function(d) { if (!d.error) { var content = ""; //can be no content on page so initialise empty as failsafe for (var i in d.query.pages) { if (d.query.pages[i].revisions) content = d.query.pages[i].revisions[0]["*"]; }							main.performRollback(title,content,currentUser,lastUser); }						else new BannerNotification('Unable to rollback (failed to get page content): ' + d.error.code,'error').show; })					.fail(function { new BannerNotification('Unable to rollback: failed to get page content!','error').show; });				}				else					new BannerNotification('Unable to rollback: no different editor found!','error').show;			}			else				new BannerNotification('Unable to rollback (failed to get revisions): ' + d.error.code,'error').show;		}) .fail(function {			new BannerNotification('Unable to rollback: failed to get revisions!','error').show;		}); },	performRollback: function(page,text,user,user2) { var API = new mw.Api; API.post({		action: 'edit',		title: page,		text: text,		summary: 'Reverted edits by ' + user + ' (talk | block) to last version by ' + user2 + ' (script)',		token: mw.user.tokens.values.editToken		}) .done(function(d) {			if (!d.error) {				new BannerNotification('Rollback successful!','confirm').show;							}			else				new BannerNotification('Unable to rollback (failed to publish edit): ' + d.error.code,'error').show;		}) .fail(function {			new BannerNotification('Unable to rollback: failed to publish edit!','error').show;		}); } }; main.init; }) (this.jQuery, this.mediaWiki); // Adds NavigationPopups // wikipedia:User:Lupin/popups mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400"); popupRevertSummary = 'Revert to revision dated %s by %s, oldid %s using popups'; popupQueriedRevertSummary = 'Revert to revision $1 dated $2 by $3 using popups'; popupExtendedRevertSummary = 'Revert to revision dated %s by %s, oldid %s using popups'; popupQueriedRevertToPreviousSummary = 'Revert to the revision prior to revision $1 dated $2 by $3 using popups'; popupRevertToPreviousSummary = 'Revert to the revision prior to revision %s using popups'; popupRevertSummaryPrompt = true; popupStructure = 'menus'; popupFixDabs = 'true'; popupFixDabsSummary = 'Disambiguate %s to %s using popups'; popupRmDabLinkSummary = 'Remove link to dab page %s using popups'; // END Adds NavigationPopups // install User:Cacycle/wikEdDiff enhanced diff importScriptURI('//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEdDiff.js&action=raw&ctype=text/javascript');
 * (function($, mw) {

if(window.location.pathname.indexOf('Special:InfoboxBuilder') != -1) { var pname = window.location.pathname.split('Special:InfoboxBuilder/')[1]; location.replace(document.URL.replace(window.location.href.split('/wiki/')[1], 'Template:' + pname + '?action=edit&useeditor=source')); }

/* Restoring old wikia logo */ $('.wds-is-wds-company-logo-fandom').replaceWith('');

$('.wds-is-wds-company-logo-powered-by-wikia').replaceWith('');