(well, that certainly won't work :P) Tag: sourceedit |
No edit summary Tag: sourceedit |
||
Line 166: | Line 166: | ||
'u:kocka:MediaWiki:AjaxCommentDelete/code.js', |
'u:kocka:MediaWiki:AjaxCommentDelete/code.js', |
||
'u:kocka:MediaWiki:AjaxThreadDelete/code.js', |
'u:kocka:MediaWiki:AjaxThreadDelete/code.js', |
||
− | 'u:kocka:User:KockaAdmiralac/PatrolAll.javascript' |
+ | 'u:kocka:User:KockaAdmiralac/PatrolAll.javascript' |
− | 'u:thev1ct0ri0u5:User:TheV1ct0ri0u5/monobook.js' |
||
] |
] |
||
}); |
}); |
||
+ | |||
+ | // Rollback (yes, I know my work is trash) |
||
+ | if (mw.config.get('wgContentLanguage') === 'es') { |
||
+ | importScriptPage('User:TheV1ct0ri0u5/rollback-es.javascript', 'thev1ct0ri0u5'); |
||
+ | } else { |
||
+ | importScriptPaage('User:TheV1ct0ri0u5/rollback-en.javascript', 'thev1ct0ri0u5'); |
||
+ | } |
||
/***********/ |
/***********/ |
Revision as of 19:41, 1 March 2017
window.UserTagsJS = {
modules: {},
tags: {
//Common local usergroups
sysop: { u:'Sysop' , order:0 },
'content-moderator': { u:'Content', order:1 },
rollback: { u:'Rollback', order:1},
threadmoderator: { u:'Discussions' },
chatmoderator: { u:'Chat' },
patroller: { u:'Patroller' },
checkuser: { u:'CU', order:2 },
//Global
staff: { u:'W', order:-1/0 },
vstf: { u:'VSTF', order:1 },
helper: { u:'Helper' },
council: { u:'Council' },
vanguard: { u:'Portability' }
}
};
UserTagsJS.modules.mwGroups = ['bureaucrat', 'sysop', 'content-moderator', 'rollback', 'threadmoderator', 'chatmoderator', 'patroller', 'checkuser', 'staff', 'vstf', 'helper', 'council', 'vanguard'];
UserTagsJS.modules.newuser = {
days: 7,
edits: 10
};
UserTagsJS.modules.metafilter = {
'vanguard': ['sysop', 'bureaucrat'],
'sysop': ['staff'],
'chatmoderator': ['sysop', 'threadmoderator'],
'vstf': ['chatmoderator', 'sysop'],
};
importArticle({type:'script', article:'w:c:dev:UserTags/code.js'});
//New tab for external links
$('.external').attr('target', '_blank');
//Monobook contribs button (credit to Josephyr)
if ({ 'User': 1, 'Message_Wall': 1 }[mw .config.get('wgCanonicalNamespace')]) { $('#p-cactions .pBody li:nth-child(2)') .after( '<li id="ca-contribs"><a href="' + mw.config.get('wgServer') + '/wiki/Special:Contributions/' + mw.config .get('wgTitle') + '">Contributions</a></li>'); }
//Moving toolbox below logo
$(function() { $('#p-logo').after($('#p-tb').detach()); $('#p-tb').after($('#p-search').detach()); });
/****************/
/* Import Specs */
/****************/
//STEs
window.dev = window.dev || {};
window.dev.editSummaries = {
select: [
'(edit summaries)',
'Standard Editing', [
'Cleanup',
'redir → [[Page]]',
'Corrected spelling/grammar',
'Copyedit',
'Wikitext cleanup/formatting',
'Format'
],
'WLB-en', [
'Spelling/grammar correction (WLB [[w:c:wlb:Correction: (EN)]]; EN)',
'Translation (LANG → EN)',
'Spotlight request response (EN)'
],
'WLB-es', [
'Corrección ortográfica/gramatical (WLB [[w:c:wlb:Correction: (ES)]]; ES)',
'Traducción (LANG → ES)',
'Respuesta a la solicitud Spotlight (ES)'
],
'Spam/Vandalism', [
'Removal of vandalism',
'Removal of offensive material',
'Removal of spam',
'Removal of content which violates Wikia\'s [[w:c:homepage:Terms of Use|Terms of Use]]'
]
]
};
//FastDelete
window.fdButtons = [];
window.fdButtons.push(
{
summary: 'Housekeeping',
label: 'H'
},
{
summary: 'Spam',
label: 'S'
},
{
summary: 'Violation of Wikia\'s [[w:c:homepage:Terms of Use|Terms of Use]]',
label: 'ToU'
}
);
//QuickCreateUserPage
if (mw.config.get('wgContentLanguage') === 'es') {
var qtUserPageTemplate = '{{:w:User:TheV1ct0ri0u5/WLB-es}}';
} else {
var qtUserPageTemplate = '{{:w:User:TheV1ct0ri0u5/WLB-en}}';
}
var qtEnableUserPageOverwrite = true;
//LastEdited
window.lastEdited = {
time: 'timestamp'
};
/************/
/* Chat fix */
/************/
if (mw.config.get('wgCanonicalSpecialPageName') == 'Chat') {
window.location = "?useskin=wikia";
}
/***********************/
/* Oasis modifications */
/***********************/
if (mw.config.get('wgSkin') === 'oasis' || mw.config.get('wgSkin') === 'wikia') {
//User Menu
$('.user-menu').append('<li><a href="http://c.wikia.com/wiki/User:TheV1ct0ri0u5/global.js" target="_blank">global.js</a></li>');
$('.user-menu').append('<li><a href="/wiki/User:TheV1ct0ri0u5/common.js" target="_blank">common.js</a></li>');
$('.user-menu').append('<li><a href="/wiki/User:TheV1ct0ri0u5/sig" target="_blank">Local Signature</a></li>');
$('.user-menu').append('<li><a href="http://c.wikia.com/wiki/Template:User:JustAnIng/AM">Bio</a></li>');
//Toolbar
$(function() {
$('ul.tools li:first-child').before('<li><a href="http://c.wikia.com/wiki/Special:Chat" target="_blank">CCC</a></li>');
$('ul.tools li:first-child').before('<li><a href="/wiki/Message_Wall_Greeting:TheV1ct0ri0u5?action=edit" target="_blank">MW Greeting</a></li>');
$('ul.tools li:first-child').before('<li><a href="/wiki/Special:Log?page=' + mw.config.get('wgPageName') + '">Page Logs</a></li>');
$('ul.tools li:first-child').before('<li><a href="/wiki/Special:ListUsers?group=sysop">Sysops</a></li>');
$('ul.tools li:first-child').before('<li><a href="/wiki/Special:ListGroupRights">Groups/Rights</a></li>');
$('ul.tools li:first-child').before('<li><a href="/wiki/Special:RecentChanges">Recent Changes</a></li>');
$('ul.tools li:last-child').after('<li><a href="/wiki/Special:Log?type=rights">RtsL</a></li>');
$('ul.tools li:last-child').after('<li><a href="/wiki/Special:Log?type=block&page=User:' + mw.config.get('wgTitle') + '">UB</a></li>');
$('ul.tools li:last-child').after('<li><a href="/wiki/Special:Contributions?target=' + mw.config.get('wgTitle') + '">UC</a></li>');
$('ul.tools li:last-child').after('<li><a href="/wiki/Special:NewPages">NP</a></li>');
$('ul.tools li:last-child').after('<li><a href="/wiki/Special:Log?type=block">BlLog</a></li>');
$('ul.tools li:last-child').after('<li><a href="/wiki/Special:BlockList">BList</a></li>');
});
}
/********/
/* AJAX */
/********/
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AnchoredRollback/code.js',
'u:dev:MediaWiki:AjaxDiff/code.js',
'u:dev:MediaWiki:AjaxPatrol/code.js',
'u:dev:MediaWiki:AjaxBlock/code.js',
'u:dev:MediaWiki:AjaxRC/code.js',
'u:dev:MediaWiki:AjaxRename/code.js',
'u:dev:MediaWiki:AjaxUndo/code.js',
'u:dev:AjaxThreadUnfollow/code.js',
'u:starmanw:MediaWiki:QuickLogs/code.js',
'u:kocka:MediaWiki:AjaxCommentDelete/code.js',
'u:kocka:MediaWiki:AjaxThreadDelete/code.js',
'u:kocka:User:KockaAdmiralac/PatrolAll.javascript'
]
});
// Rollback (yes, I know my work is trash)
if (mw.config.get('wgContentLanguage') === 'es') {
importScriptPage('User:TheV1ct0ri0u5/rollback-es.javascript', 'thev1ct0ri0u5');
} else {
importScriptPaage('User:TheV1ct0ri0u5/rollback-en.javascript', 'thev1ct0ri0u5');
}
/***********/
/* Editing */
/***********/
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:FindAndReplace/code.js',
'u:dev:MediaWiki:View_Source/code.js',
'u:dev:MediaWiki:ViewRemoved/code.js',
'u:dev:MediaWiki:QuickCreateUserPage/code.js',
'u:dev:MediaWiki:RedirectManagement/code.js',
'u:dev:MediaWiki:Standard_Edit_Summary/code.js',
'u:dev:MediaWiki:AjaxBatchDelete/code.js',
'u:dev:MediaWiki:MassRename/code.js',
'u:dev:MediaWiki:MultiUpload/code.js'
]
});
/************************/
/* Community Management */
/************************/
importArticles({
type: 'script',
articles: [
'u:vstf:User:Joeyaa/wham.js',
'u:dev:MediaWiki:RevealAnonIP/usercode.js',
'u:dev:MediaWiki:FastDelete/code.js',
'u:dev:MediaWiki:Nuke/code.js',
'u:dev:MediaWiki:DiscussionsFeed.js',
'u:dev:MediaWiki:MarkBlocked.js'
]
});
/**************/
/* Appearance */
/**************/
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:DisplayClock/code.js',
'u:dev:MediaWiki:LastEdited/code.js',
'u:dev:MediaWiki:AbuseLogRC.js',
'u:dev:PortableCSSPad/code.js'
]
});
importScriptURI('http://monchbox.wikia.com/index.php?title=MediaWiki:Torus.js/main.js&action=raw&ctype=text/javascript&templates=expand');
//AutoWikiBrowser.js
importScriptURI('//en.wikipedia.org/w/index.php?title=User:Joeytje50/AWB.js/load.js&action=raw&ctype=text/javascript');
/* Make Visual Editor links load the regular editor instead (from Nerfmaster8) */
if ($.getUrlVar('veaction') == 'edit') {
location.replace(document.URL.replace('veaction','action'));
}
if (window.location.pathname.indexOf('Special:InfoboxBuilder') != -1) {
var name = window.location.pathname.split('Special:InfoboxBuilder/')[1];
location.replace(document.URL.replace(window.location.href.split('/wiki/')[1],'Template:'+name+'?action=edit&useeditor=source'));
}
/* Unchecks redirects when moving (from AmonFatalis)
I should have thought of this sooner... */
if (mw.config.get('wgCanonicalSpecialPageName') == "Movepage") {
$('#wpLeaveRedirect').removeAttr('checked');
}
/*
don't ask...
It was a fix for the full site on mobile switching from monobook to Oasis automatically...
*/
/*
var url = window.location.href;
if (url.indexOf('?') > -1) {
if (url.indexOf('?useskin=oasis'||'&useskin=oasis') > -1) {
window.location = window.location.toString().replace(/useskin=oasis/, 'useskin=monobook');
}
}
*/