@@ -18,6 +18,7 @@ import DeputyReviewDialog from '../../../ui/root/DeputyReviewDialog';
1818import normalizeTitle from '../../../wiki/util/normalizeTitle' ;
1919import getPageContent from '../../../wiki/util/getPageContent' ;
2020import openWindow from '../../../wiki/util/openWindow' ;
21+ import changeTag from '../../../config/changeTag' ;
2122
2223interface CopiedTemplateEditorDialogData {
2324 main : CopiedTemplateEditor ;
@@ -234,13 +235,13 @@ function initCopiedTemplateEditorDialog() {
234235 framed : false ,
235236 invisibleLabel : true ,
236237 label : mw . msg ( 'deputy.ante.mergeAll' ) ,
237- title : mw . msg ( 'deputy.ante.mergeAll' ) ,
238+ title : mw . msg ( 'deputy.ante.mergeAll' )
238239 } ) ;
239240 this . mergeButton . on ( 'click' , ( ) => {
240241 const notices = this . parsoid . findRowedNoticesByHref ( ) ;
241- const noticeCount = Object . values ( notices )
242+ const noticeCount = Object . values ( notices )
242243 . filter ( v => v . length > 1 )
243- . reduce ( ( p , n ) => p + n . length , 0 ) ;
244+ . reduce ( ( p , n ) => p + n . length , 0 ) ;
244245 return noticeCount ?
245246 OO . ui . confirm (
246247 mw . message (
@@ -252,8 +253,8 @@ function initCopiedTemplateEditorDialog() {
252253 return ;
253254 }
254255
255- for ( const noticeSet of Object . values ( notices ) ) {
256- TemplateMerger . merge ( noticeSet ) ;
256+ for ( const noticeSet of Object . values ( notices ) ) {
257+ TemplateMerger . merge ( noticeSet ) ;
257258 }
258259 } ) :
259260 OO . ui . alert ( 'There are no templates to merge.' ) ;
@@ -324,13 +325,15 @@ function initCopiedTemplateEditorDialog() {
324325
325326 this . layout . on ( 'remove' , ( ) => {
326327 this . mergeButton . setDisabled (
327- ! Object . values ( this . parsoid . findRowedNoticesByHref ( ) ) . some ( v => v . length > 1 )
328+ ! Object . values ( this . parsoid . findRowedNoticesByHref ( ) )
329+ . some ( v => v . length > 1 )
328330 ) ;
329331 deleteButton . setDisabled ( this . parsoid . findNotices ( ) . length === 0 ) ;
330332 } ) ;
331333 this . parsoid . addEventListener ( 'templateInsert' , ( ) => {
332334 this . mergeButton . setDisabled (
333- ! Object . values ( this . parsoid . findRowedNoticesByHref ( ) ) . some ( v => v . length > 1 )
335+ ! Object . values ( this . parsoid . findRowedNoticesByHref ( ) )
336+ . some ( v => v . length > 1 )
334337 ) ;
335338 deleteButton . setDisabled ( this . parsoid . findNotices ( ) . length === 0 ) ;
336339 } ) ;
@@ -439,7 +442,7 @@ function initCopiedTemplateEditorDialog() {
439442
440443 // Recheck state of merge button
441444 this . mergeButton . setDisabled (
442- ! Object . values ( this . parsoid . findRowedNoticesByHref ( ) )
445+ ! Object . values ( this . parsoid . findRowedNoticesByHref ( ) )
443446 . some ( v => v . length > 1 )
444447 ) ;
445448
@@ -478,6 +481,7 @@ function initCopiedTemplateEditorDialog() {
478481 // Saves the page.
479482 process . next ( async ( ) => {
480483 return new mw . Api ( ) . postWithEditToken ( {
484+ ...changeTag ( await window . CopiedTemplateEditor . getWikiConfig ( ) ) ,
481485 action : 'edit' ,
482486 format : 'json' ,
483487 formatversion : '2' ,
0 commit comments