User:DannyS712/SectionMover.js: Difference between revisions

Content deleted Content added
x
m links
 
(10 intermediate revisions by 3 users not shown)
Line 1:
// Originaly by User:Flooded with them hundreds
// Copied to [[User:DannyS712/SectionMover.js]] after FWTH retired, who took over as maintainer
// Install with:
// <code><nowiki> {{subst:Iusc|User:DannyS712/SectionMover.js}} </nowiki></code>
// or with
// <code><nowiki> importScript( 'User:DannyS712/SectionMover.js' ); // Backlink: [[User:DannyS712/SectionMover.js]] </nowiki></code>
//
// If forking this script, please give both of use credit
$.when( mw.loader.using(['mediawiki.util','mediawiki.api']), $.ready).done( function () {
var validSections = {},
Line 16 ⟶ 24:
'p-cactions',
'#',
'XXXMove section',
'pt-oeca',
'Enter/exit the process',
Line 28 ⟶ 36:
$( '#Movebutton' ).toggle();
} );
overlay.html( 'move the selected sections' )
.attr( 'id', 'Movebutton' )
.css( 'position', 'fixed' )
.css( 'bottom', 0'20px' )
.css( 'height', '44px50px' )
.css( 'width', '100%' )
.css( 'font-size', '200%' );
Line 78 ⟶ 86:
title: mw.config.get( 'wgPageName' ),
text: revisedPage,
summary: 'Moved ' + numOfThreads + ' sections to [[' + archiveTarget + ']] using [[User:DannyS712/SectionMover.js|SectionMover]]',
basetimestamp: revStamp,
starttimestamp: revStamp
Line 91 ⟶ 99:
title: archiveTarget,
appendtext: '\n' + archiveThis,
summary: 'Moved sections from [[' + mw.config.get( 'wgPageName' ) + ']] using [[User:DannyS712/SectionMover.js|SectionMover]]'
}
).done( function ( res2 ) {
Line 102 ⟶ 110:
} );
} ).fail( function ( res1 ) {
alert( 'failed to removemove sections from page. aborting process.' );
console.log( res1 );
window.___location.reload();
Line 157 ⟶ 165:
+ '<a data-section=' + sectionNumber + ' '
+ 'onclick=$(this).closest(\':header\').toggleClass(\'arxyhighlight\');$(this).toggleClass(\'arxylink\');>'
+ 'archivemove section</a>'
+ '<span class=mw-editsection-bracket>]</span>'
+ '</span>';