No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
summary: 'Script: Creating user profile' |
summary: 'Script: Creating user profile' |
||
}; |
}; |
||
− | |||
⚫ | |||
− | $(".ogg_player .image").remove(); |
||
⚫ | |||
− | |||
− | /* Auto-refreshing recent changes */ |
||
− | ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; |
||
− | AjaxRCRefreshText = 'Auto-refresh'; |
||
− | AjaxRCRefreshHoverText = 'Automatically refresh the page'; |
||
− | importScriptPage('MediaWiki:AjaxRC/code.js', 'dev'); |
||
/* Admin highlights */ |
/* Admin highlights */ |
||
Line 22: | Line 12: | ||
sysop: '#0148c2' |
sysop: '#0148c2' |
||
}; |
}; |
||
− | |||
− | /** Archive edit tab disabling ************************************* |
||
− | * Disables the edit tab on old forum topic pages to stop new people bumping old topics. |
||
− | * Page can still be edited by going via the edit tab on the history etc, or by |
||
− | * typing the edit address manually. |
||
− | * By [[User:Spang|Spang]] |
||
− | * Monaco support by [[User:Uberfuzzy|Uberfuzzy]] |
||
− | * Oasis support by [[User:Uberfuzzy|Uberfuzzy]] |
||
− | */ |
||
− | |||
− | if (wgNamespaceNumber == 110) { |
||
− | addOnloadHook(disableOldForumEdit); |
||
⚫ | |||
− | |||
− | function disableOldForumEdit() { |
||
− | if (typeof(enableOldForumEdit) != 'undefined' && enableOldForumEdit) { |
||
⚫ | |||
⚫ | |||
− | if (!document.getElementById('old-forum-warning')) { |
||
− | return; |
||
− | } |
||
− | |||
− | if (skin == 'oasis') { |
||
− | $('#WikiaPageHeader .wikia-menu-button a:first').html('Archived').removeAttr('href'); |
||
− | return; |
||
− | } |
||
− | |||
− | if (!document.getElementById('ca-edit')) { |
||
− | return; |
||
− | } |
||
− | var editLink = null; |
||
− | if (skin == 'monobook') { |
||
− | editLink = document.getElementById('ca-edit').firstChild; |
||
− | } else { |
||
− | return; |
||
− | } |
||
− | |||
− | |||
− | editLink.removeAttribute('href', 0); |
||
− | editLink.removeAttribute('title', 0); |
||
− | editLink.style.color = 'gray'; |
||
− | editLink.innerHTML = 'Archived'; |
||
− | |||
− | $('span.editsection-upper').remove(); |
||
− | |||
⚫ | |||
/* Standard edit summaries |
/* Standard edit summaries |
||
Line 95: | Line 39: | ||
} |
} |
||
$(fillEditSummaries); |
$(fillEditSummaries); |
||
+ | |||
+ | /* "Temporary" fix for {{#dpl:execandexit=geturlargs}} by User:MarkusRost */ |
||
⚫ | |||
+ | /* Make the confirmation on action=purge keep DPL arguments */ |
||
+ | if ( mw.config.get('wgAction') === 'purge' ) { |
||
+ | var purgeForm = $('#mw-content-text form.mw-htmlform'); |
||
+ | var purgeParams = purgeForm.find('input[name="redirectparams"]').val().split('&').filter( function (param) { |
||
+ | return param.startsWith('DPL_'); |
||
⚫ | |||
+ | if ( purgeParams.length ) { |
||
+ | purgeForm.attr('action', purgeForm.attr('action') + '&' + purgeParams.join('&') ); |
||
⚫ | |||
+ | } |
||
+ | /* Avoid the purge confirmation all together, restoring legacy behaviour until extension is fixed */ |
||
+ | $('.DPL-purge a.external, a.external[href^="https://avatar.fandom.com/"][href*="&action=purge"]').on( 'click', function( e ) { |
||
+ | var $form = $( '<form>' ).attr( { |
||
+ | method: 'POST', |
||
+ | action: this.href, |
||
+ | } ).appendTo( document.body ); |
||
+ | $form.submit(); |
||
+ | e.preventDefault(); |
||
+ | } ); |
||
⚫ | |||
+ | |||
+ | /* User profile header custom tags */ |
||
+ | window.UserTagsJS = { |
||
+ | modules: {}, |
||
+ | tags: { |
||
+ | sysop: { link:'Project:Administrators' }, |
||
+ | rollback: { link:'Project:Rollback' } |
||
⚫ | |||
⚫ | |||
+ | window.UserTagsJS.modules.inactive = 30; |
||
+ | window.UserTagsJS.modules.mwGroups = ['rollback', 'sysop', 'bot', 'bot-global']; |
Revision as of 20:14, 13 June 2021
/* To replace the now dead "welcome bot" */
window.AutoCreateUserPagesConfig = {
content: {
2: '{{sub'+'st:New user}}',
3: false
},
summary: 'Script: Creating user profile'
};
/* Admin highlights */
highlight = {
sysop: '#0148c2'
};
/* Standard edit summaries
* jQuery version of Sikon's fillEditSummaries
* @author Grunny - taken from Wookieepedia */
function fillEditSummaries() {
if ( !$( '#wpSummaryLabel' ).length ) {
return;
}
$.get( mw.config.get( 'wgScript' ), { title: 'Template:Stdsummaries', action: 'raw', ctype: 'text/plain' } ).done( function( data ) {
var $summaryOptionsList,
$summaryLabel = $( '#wpSummaryLabel' ),
lines = data.split( '\n' ),
$wrapper = $( '<div>').addClass( 'edit-widemode-hide' ).text( 'Standard summaries: ' );
$summaryOptionsList = $( '<select />' ).attr( 'id', 'stdEditSummaries' ).change( function() {
var editSummary = $( this ).val();
if ( editSummary !== '' ) {
$( '#wpSummary' ).val( editSummary );
}
} );
for ( var i = 0; i < lines.length; i++ ) {
var editSummaryText = ( lines[i].indexOf( '-- ' ) === 0 ) ? lines[i].substring(3) : '';
$summaryOptionsList.append( $( '<option>' ).val( editSummaryText ).text( lines[i] ) );
}
$summaryLabel.prepend( $wrapper.append( $summaryOptionsList ) );
} );
}
$(fillEditSummaries);
/* "Temporary" fix for {{#dpl:execandexit=geturlargs}} by User:MarkusRost */
$( function() {
/* Make the confirmation on action=purge keep DPL arguments */
if ( mw.config.get('wgAction') === 'purge' ) {
var purgeForm = $('#mw-content-text form.mw-htmlform');
var purgeParams = purgeForm.find('input[name="redirectparams"]').val().split('&').filter( function (param) {
return param.startsWith('DPL_');
} );
if ( purgeParams.length ) {
purgeForm.attr('action', purgeForm.attr('action') + '&' + purgeParams.join('&') );
}
}
/* Avoid the purge confirmation all together, restoring legacy behaviour until extension is fixed */
$('.DPL-purge a.external, a.external[href^="https://avatar.fandom.com/"][href*="&action=purge"]').on( 'click', function( e ) {
var $form = $( '<form>' ).attr( {
method: 'POST',
action: this.href,
} ).appendTo( document.body );
$form.submit();
e.preventDefault();
} );
} );
/* User profile header custom tags */
window.UserTagsJS = {
modules: {},
tags: {
sysop: { link:'Project:Administrators' },
rollback: { link:'Project:Rollback' }
}
};
window.UserTagsJS.modules.inactive = 30;
window.UserTagsJS.modules.mwGroups = ['rollback', 'sysop', 'bot', 'bot-global'];