m (Calling a rollback an Eraser makes it sound like being a rollback is bad. :/) Tag: sourceedit |
No edit summary Tag: sourceedit |
||
Line 1: | Line 1: | ||
− | |||
/* AJAX */ |
/* AJAX */ |
||
Window.ajaxPages = ["Special:RecentChanges", "Special:WikiActivity", "Special:NewPages"]; |
Window.ajaxPages = ["Special:RecentChanges", "Special:WikiActivity", "Special:NewPages"]; |
||
Line 13: | Line 12: | ||
/* End of the {{USERNAME}} replacement */ |
/* End of the {{USERNAME}} replacement */ |
||
− | |||
− | |||
− | |||
//Spoiler alert config |
//Spoiler alert config |
||
Line 59: | Line 55: | ||
}; |
}; |
||
− | //Usertags config |
||
− | window.UserTagsJS = { |
||
− | modules: {}, |
||
− | tags: { |
||
− | bureaucrat: { u: 'The Director', link: 'Help:User access levels#Bureaucrats', order:1 }, |
||
− | sysop: { link:'Help:User access levels#Administrators', order:2 }, |
||
− | rollback: { u: 'Rollback', link:'Help:User access levels#Rollbacks', order:3 }, |
||
− | chatmoderator: { link:'Help:User access levels#Chat Moderators', order:4 }, |
||
− | bot: { link:'Help:Bots' }, |
||
− | } |
||
− | }; |
||
− | UserTagsJS.modules.isblocked = true; |
||
− | |||
− | UserTagsJS.modules.mwGroups = ['bot', 'bot-global', 'rollback', 'bureaucrat']; |
||
− | |||
− | UserTagsJS.modules.inactive = { |
||
− | days: 60, |
||
− | zeroIsInactive: true |
||
− | }; |
||
− | UserTagsJS.modules.metafilter = { |
||
− | 'rollback': ['sysop'], |
||
− | }; |
||
− | UserTagsJS.modules.autoconfirmed = true; |
||
− | |||
− | |||
− | UserTagsJS.modules.autoconfirmed = true; |
||
− | |||
− | UserTagsJS.modules.nonuser = (mediaWiki.config.get('skin') === 'monobook'); |
||
− | |||
− | |||
− | |||
− | |||
− | |||
//lock forums config |
//lock forums config |
||
window.LockForums = { |
window.LockForums = { |
||
Line 101: | Line 64: | ||
//ajax rc config |
//ajax rc config |
||
window.ajaxPages = ["Special:WikiActivity","Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; |
window.ajaxPages = ["Special:WikiActivity","Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; |
||
− | |||
//script imports |
//script imports |
||
Line 107: | Line 69: | ||
type: 'script', |
type: 'script', |
||
articles: [ |
articles: [ |
||
− | |||
'u:dev:LockOldBlogs/code.js', |
'u:dev:LockOldBlogs/code.js', |
||
'u:dev:Standard_Edit_Summary/code.js', |
'u:dev:Standard_Edit_Summary/code.js', |
||
− | 'u:dev:UserTags/code.js', |
||
'w:c:dev:ReferencePopups/code.js', |
'w:c:dev:ReferencePopups/code.js', |
||
"w:c:dev:LockForums/code.js", |
"w:c:dev:LockForums/code.js", |
Latest revision as of 16:21, 27 July 2016
/* AJAX */
Window.ajaxPages = ["Special:RecentChanges", "Special:WikiActivity", "Special:NewPages"];
/* Replaces {{USERNAME}} with the name of the user browsing the page.
Requires copying Template:USERNAME. */
function UserNameReplace() {
if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName === null) return;
$("span.insertusername").html(wgUserName);
}
addOnloadHook(UserNameReplace);
/* End of the {{USERNAME}} replacement */
//Spoiler alert config
SpoilerAlert = {
isSpoiler: function () {
return -1 !== wgCategories.indexOf('Spoiler');
}
};
/** Test if an element has a certain class **************************************
*
* Description: Uses regular expressions and caching for better performance.
* Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]]
*/
var hasClass = (function () {
var reCache = {};
return function (element, className) {
return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
};
})();
/* add contribs to user menu - 2/1/11 */
function UserContribsMenuItem() {
$('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('<li><a href="/wiki/Special:Contributions/'+ encodeURIComponent (wgUserName) +'">My contributions</a></li>');
}
addOnloadHook(UserContribsMenuItem);
/* add history to the dropdown menu for pages - 2/1/11 */
function HistoryDropdownMenuItem() {
$('ul.wikia-menu-button li:first-child ul li:first-child').after('<li><a href="/index.php?title='+ encodeURIComponent (wgPageName) +'&action=history">History</a></li>');
}
addOnloadHook(HistoryDropdownMenuItem);
//lock old blogs config
window.LockOldBlogs = {
expiryDays: 30,
expiryMessage: "This blog is considered archived because it hasn\'t been commented on in over <expiryDays> days.",
nonexpiryCategory: "Never archived blogs"
};
//lock forums config
window.LockForums = {
expiryDays: 30,
expiryMessage: "This forum is considered archived because it hasn\'t been commented on in over <expiryDays> days.",
forumName: "Forum Board"
};
//ajax rc config
window.ajaxPages = ["Special:WikiActivity","Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"];
//script imports
window.importArticles( {
type: 'script',
articles: [
'u:dev:LockOldBlogs/code.js',
'u:dev:Standard_Edit_Summary/code.js',
'w:c:dev:ReferencePopups/code.js',
"w:c:dev:LockForums/code.js",
'u:dev:DisplayClock/code.js',
'u:dev:SpoilerAlert/code.js',
'u:dev:AjaxRC/code.js',
'w:dev:WallGreetingButton/code.js',
'u:admintools:MediaWiki:Common.js/SvgToPng.js',
'u:dev:ExtendedNavigation/code.js',
]
} );