Skip to content

Commit 10da088

Browse files
committed
UnblockReview: add support for {{Unblock-un}}
1 parent e57a7dc commit 10da088

4 files changed

Lines changed: 192 additions & 58 deletions

File tree

‎UnblockReview/main.js‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Many additional bugs fixed.
77
( async function () {
88
const UNBLOCK_REQ_COLOR_PRE_2025 = 'rgb(235, 244, 255)';
99
const UNBLOCK_REQ_COLOR_POST_2025 = 'var(--background-color-progressive-subtle, #EBF4FF)';
10-
const UNBLOCK_SPAMUN_COLOR = 'var(--background-color-progressive-subtle, #f1f4fd)';
10+
const UNBLOCK_USERNAME_COLOR = 'var(--background-color-progressive-subtle, #f1f4fd)';
1111
const DEFAULT_DECLINE_REASON = '{{subst:Decline reason here}}';
1212
const ADVERT = ' ([[User:Novem Linguae/Scripts/UnblockReview.js|unblock-review]])';
1313

@@ -23,13 +23,13 @@ Many additional bugs fixed.
2323
if (
2424
userBlockBoxes[ i ].style[ 'background-color' ] === UNBLOCK_REQ_COLOR_PRE_2025 ||
2525
userBlockBoxes[ i ].style.background === UNBLOCK_REQ_COLOR_POST_2025 ||
26-
userBlockBoxes[ i ].style.background === UNBLOCK_SPAMUN_COLOR
26+
userBlockBoxes[ i ].style.background === UNBLOCK_USERNAME_COLOR
2727
) {
2828
// We now have a pending unblock request - add UI
2929
const unblockDiv = userBlockBoxes[ i ];
3030
const [ container, hrEl ] = addTextBoxAndButtons( unblockDiv );
31-
const isSpamUn = unblockDiv.style.background === UNBLOCK_SPAMUN_COLOR;
32-
await listenForAcceptAndDecline( container, hrEl, isSpamUn );
31+
const hasUsernameParameter = unblockDiv.style.background === UNBLOCK_USERNAME_COLOR;
32+
await listenForAcceptAndDecline( container, hrEl, hasUsernameParameter );
3333
}
3434
}
3535
}
@@ -94,28 +94,28 @@ Many additional bugs fixed.
9494
return copy.textContent.trim();
9595
}
9696

97-
async function listenForAcceptAndDecline( container, hrEl, isSpamUn ) {
97+
async function listenForAcceptAndDecline( container, hrEl, hasUsernameParameter ) {
9898
const reasonArea = container.querySelector( 'textarea' );
9999
$( container ).find( 'button' ).on( 'click', async function () {
100100
// look at the innerHtml of the button to see if it says "Accept" or "Decline"
101101
const acceptOrDecline = $( this ).text().toLowerCase();
102102
const reasonHeader = hrEl.nextElementSibling;
103103
const reasonElement = reasonHeader && reasonHeader.nextElementSibling;
104104
let appealReason;
105-
if ( isSpamUn && reasonElement ) {
105+
if ( hasUsernameParameter && reasonElement ) {
106106
// The requested username has extra links, while the reason is in a separate div.
107107
const usernameLink = reasonElement.firstElementChild;
108108
const reasonLabel = reasonElement.nextElementSibling;
109-
const spamReason = reasonLabel && reasonLabel.nextElementSibling;
109+
const usernameReason = reasonLabel && reasonLabel.nextElementSibling;
110110
if ( reasonElement.tagName === 'DIV' && usernameLink && usernameLink.tagName === 'A' &&
111-
reasonLabel && reasonLabel.tagName === 'B' && spamReason && spamReason.tagName === 'DIV' ) {
111+
reasonLabel && reasonLabel.tagName === 'B' && usernameReason && usernameReason.tagName === 'DIV' ) {
112112
const username = usernameLink.textContent.trim();
113-
const reason = getAppealText( spamReason );
113+
const reason = getAppealText( usernameReason );
114114
if ( username && reason ) {
115115
appealReason = username + '|' + reason;
116116
}
117117
}
118-
} else if ( !isSpamUn && reasonElement ) {
118+
} else if ( !hasUsernameParameter && reasonElement ) {
119119
appealReason = getAppealText( reasonElement );
120120
}
121121
// FIXME: should handle this case (|reason=\nText, https://github.com/NovemLinguae/UserScripts/issues/240) instead of throwing an error
@@ -138,7 +138,7 @@ Many additional bugs fixed.
138138
acceptDeclineReason,
139139
DEFAULT_DECLINE_REASON,
140140
acceptOrDecline,
141-
isSpamUn
141+
hasUsernameParameter
142142
);
143143
} catch ( e ) {
144144
mw.notify( 'UnblockReview error: ' + e.message, { type: 'error' } );
@@ -149,7 +149,7 @@ Many additional bugs fixed.
149149
acceptDeclineReason,
150150
acceptOrDecline,
151151
e.message,
152-
isSpamUn
152+
hasUsernameParameter
153153
);
154154

155155
return;
@@ -167,7 +167,7 @@ Many additional bugs fixed.
167167
} );
168168
}
169169

170-
async function logErrorToWiki( wikitext, paramsAndReason, acceptDeclineReason, acceptOrDecline, errorMessage, isSpamUn ) {
170+
async function logErrorToWiki( wikitext, paramsAndReason, acceptDeclineReason, acceptOrDecline, errorMessage, hasUsernameParameter ) {
171171
const errorLogTitle = 'User:Novem Linguae/Scripts/UnblockReview/ErrorLog';
172172
const currentUser = mw.config.get( 'wgUserName' );
173173
const pageTitle = mw.config.get( 'wgPageName' ).replace( /_/g, ' ' );
@@ -197,7 +197,7 @@ Many additional bugs fixed.
197197
\`${ wikitext.replace( /`/g, '\\`' ) }\`;
198198
\t\tconst appealReason = \`${ paramsAndReason.replace( /`/g, '\\`' ) }\`;
199199
\t\tconst expected = \`[YOUR EXPECTED WIKITEXT HERE]\`;
200-
\t\texpect( unblockReview.getLeftHalfOfUnblockTemplate( wikitext, appealReason, ${ isSpamUn } ) ).toBe( expected );
200+
\t\texpect( unblockReview.getLeftHalfOfUnblockTemplate( wikitext, appealReason, ${ hasUsernameParameter } ) ).toBe( expected );
201201
\t} );</syntaxhighlight>
202202
203203
<syntaxhighlight lang="js">\ttest( '[YOUR TEST NAME HERE]', () => {
@@ -207,7 +207,7 @@ Many additional bugs fixed.
207207
\t\tconst acceptDeclineReason = \`${ acceptDeclineReason.replace( /`/g, '\\`' ) }\`;
208208
\t\tconst acceptOrDecline = \`${ acceptOrDecline }\`;
209209
\t\tconst expected = \`[YOUR EXPECTED WIKITEXT HERE]\`;
210-
\t\texpect( unblockReview.processAcceptOrDecline( wikitext, paramsAndReason, acceptDeclineReason, DEFAULT_DECLINE_REASON, acceptOrDecline, ${ isSpamUn } ) ).toBe( expected );
210+
\t\texpect( unblockReview.processAcceptOrDecline( wikitext, paramsAndReason, acceptDeclineReason, DEFAULT_DECLINE_REASON, acceptOrDecline, ${ hasUsernameParameter } ) ).toBe( expected );
211211
\t} );</syntaxhighlight>
212212
`;
213213

‎UnblockReview/modules/UnblockReview.js‎

Lines changed: 89 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export class UnblockReview {
22
constructor() {
33
this.SIGNATURE = '~~~~';
4+
this.templatesThatHaveUsernameParameters = [ 'unblock-un', 'unblock-spamun' ];
45
}
56

67
/**
@@ -12,10 +13,10 @@ export class UnblockReview {
1213
* @param {string} acceptDeclineReason - The reason for accepting or declining the unblock request.
1314
* @param {string} DEFAULT_DECLINE_REASON - The default reason for declining the unblock request.
1415
* @param {string} acceptOrDecline - Either "accept" or "decline".
15-
* @param {boolean} isSpamUn - Whether the request includes a separate username parameter.
16+
* @param {boolean} hasUsernameParameter - Whether the request includes a separate username parameter.
1617
* @return {string} wikitext
1718
*/
18-
processAcceptOrDecline( wikitext, paramsAndReason, acceptDeclineReason, DEFAULT_DECLINE_REASON, acceptOrDecline, isSpamUn = false ) {
19+
processAcceptOrDecline( wikitext, paramsAndReason, acceptDeclineReason, DEFAULT_DECLINE_REASON, acceptOrDecline, hasUsernameParameter = false ) {
1920
// HTML does one line break and wikitext does 2ish. Cut off all text after the first line break to avoid breaking our search algorithm.
2021
paramsAndReason = paramsAndReason.split( '\n' )[ 0 ];
2122

@@ -32,8 +33,8 @@ export class UnblockReview {
3233
}
3334
initialText = match[ 1 ];
3435
paramsAndReason = '';
35-
} else {
36-
initialText = this.getLeftHalfOfUnblockTemplate( wikitext, paramsAndReason, isSpamUn );
36+
} else if ( !hasUsernameParameter ) {
37+
initialText = this.getLeftHalfOfUnblockTemplate( wikitext, paramsAndReason );
3738
}
3839

3940
// if reason is blank, use the default decline reason
@@ -54,26 +55,34 @@ export class UnblockReview {
5455
acceptDeclineReason = this.SIGNATURE;
5556
}
5657

57-
const regEx = new RegExp(
58-
this.escapeRegExp( initialText ) + '(' + this.getAppealReasonPattern( paramsAndReason, isSpamUn ) + ')',
59-
'g'
60-
);
61-
const nowikiRanges = this.getNowikiRanges( wikitext );
62-
const matches = [ ...wikitext.matchAll( regEx ) ].filter(
63-
( match ) => !this.isInsideNowiki( match.index, nowikiRanges )
64-
);
58+
let matches;
59+
if ( hasUsernameParameter ) {
60+
matches = this.getUsernameRequestMatches( wikitext, paramsAndReason );
61+
} else {
62+
const regEx = new RegExp(
63+
this.escapeRegExp( initialText ) + '(' + this.getAppealReasonPattern( paramsAndReason ) + ')',
64+
'g'
65+
);
66+
const nowikiRanges = this.getNowikiRanges( wikitext );
67+
matches = [ ...wikitext.matchAll( regEx ) ].filter(
68+
( match ) => !this.isInsideNowiki( match.index, nowikiRanges )
69+
);
70+
}
6571
if ( matches.length > 1 ) {
6672
throw new Error( 'Too many matching unblock templates found' );
6773
}
6874
if ( matches.length === 0 ) {
6975
throw new Error( 'Replacing text with unblock message failed' );
7076
}
7177

72-
// If the match starts inside {{u|...}}, unwrap it without assuming how other templates render.
73-
const templateName = initialText.match( /^\{\{([A-Za-z-]+)/i )[ 1 ];
7478
const match = matches[ 0 ];
75-
let matchedReason = match[ 1 ];
79+
if ( hasUsernameParameter ) {
80+
initialText = match[ 1 ];
81+
}
82+
const templateName = initialText.match( /^\{\{([A-Za-z-]+)/i )[ 1 ];
83+
let matchedReason = hasUsernameParameter ? match[ 3 ] : match[ 1 ];
7684
let remainingText = wikitext.slice( match.index + match[ 0 ].length );
85+
// If the match starts inside {{u|...}}, unwrap it without assuming how other templates render.
7786
const nestedStart = initialText.lastIndexOf( '{{' );
7887
if ( nestedStart > 0 && nestedStart > initialText.lastIndexOf( '}}' ) ) {
7988
// The opening markup is in initialText, so remove its matching closing braces as well.
@@ -94,12 +103,23 @@ export class UnblockReview {
94103
// Always add 1=. That way if there's an unescaped equals sign after it, it won't break things.
95104
let replacement = '{{' + templateName + ' reviewed|' + acceptOrDecline + '=' + acceptDeclineReason + '|1=' + matchedReason;
96105

97-
// {{Unblock-spamun}} has an extra parameter for the new username. Example:
98-
// {{Unblock-spamun|NewUsername|Your reason here}}
99-
// So the output need to have a 2= instead of a 1=. Example:
100-
// {{Unblock-spamun reviewed|accept=I accept. ~~~~|NewUsername|2=Your reason here}}
101-
const hasExtraUsernameParameter = templateName.toLowerCase() === 'unblock-spamun';
102-
if ( hasExtraUsernameParameter ) {
106+
if ( hasUsernameParameter ) {
107+
const username = paramsAndReason.slice( 0, paramsAndReason.indexOf( '|' ) );
108+
const usernamePattern = this.getAppealReasonPattern( username );
109+
const parameterMatch = matchedReason.match( new RegExp(
110+
'^(' + usernamePattern + ')(\\s*\\|)(\\s*)(?:(reason|2)(\\s*=\\s*))?'
111+
) );
112+
if ( !parameterMatch ) {
113+
throw new Error( 'Unable to identify the username and reason parameters' );
114+
}
115+
const usernamePrefix = initialText.slice( initialText.indexOf( '|' ) + 1 );
116+
const reasonPrefix = parameterMatch[ 4 ] ?
117+
parameterMatch[ 3 ] + parameterMatch[ 4 ] + parameterMatch[ 5 ] :
118+
'2=' + parameterMatch[ 3 ];
119+
replacement = '{{' + templateName + ' reviewed|' + acceptOrDecline + '=' + acceptDeclineReason +
120+
'|' + usernamePrefix + parameterMatch[ 1 ] + parameterMatch[ 2 ] + reasonPrefix +
121+
matchedReason.slice( parameterMatch[ 0 ].length );
122+
} else if ( templateName.toLowerCase() === 'unblock-spamun' ) {
103123
// delete the first 1=
104124
replacement = replacement.replace( '|1=', '|' );
105125
// add a 2= after the third pipe
@@ -129,26 +149,62 @@ export class UnblockReview {
129149
return haystack.split( needle, nthOccurrence ).join( needle ).length;
130150
}
131151

152+
getUsernameRequestMatches( wikitext, paramsAndReason ) {
153+
const pattern = '(\\{\\{([A-Za-z-]+)\\s*\\|\\s*(?:1\\s*=\\s*)?)(' +
154+
this.getAppealReasonPattern( paramsAndReason, true ) + ')';
155+
const nowikiRanges = this.getNowikiRanges( wikitext );
156+
return [ ...wikitext.matchAll( new RegExp( pattern, 'g' ) ) ].filter( ( match ) => {
157+
if ( !this.templatesThatHaveUsernameParameters.includes( match[ 2 ].toLowerCase() ) ||
158+
this.isInsideNowiki( match.index, nowikiRanges ) ) {
159+
return false;
160+
}
161+
let depth = 0;
162+
const end = match.index + match[ 0 ].length;
163+
for ( let i = match.index; i < end - 1; i++ ) {
164+
if ( this.isInsideNowiki( i, nowikiRanges ) ) {
165+
continue;
166+
}
167+
if ( wikitext.slice( i, i + 2 ) === '{{' ) {
168+
depth++;
169+
i++;
170+
} else if ( wikitext.slice( i, i + 2 ) === '}}' ) {
171+
depth--;
172+
i++;
173+
if ( depth === 0 ) {
174+
return false;
175+
}
176+
}
177+
}
178+
return true;
179+
} );
180+
}
181+
132182
/**
133183
* Given the wikitext of an entire page, and the |reason= parameter of one of the many unblock templates (e.g. {{Unblock}}, {{Unblock-un}}, {{Unblock-auto}}, {{Unblock-bot}}, etc.), return the wikitext of just the beginning of the template.
134184
*
135185
* For example, "Test {{unblock|reason=Your reason here [[User:Filipe46]]}} Test" as the wikitext and "Your reason here" as the appealReason will return "{{unblock|reason=".
136186
*
137187
* This can also handle 1=, and no parameter at all (just a pipe)
138188
*/
139-
getLeftHalfOfUnblockTemplate( wikitext, appealReason, isSpamUn = false ) {
189+
getLeftHalfOfUnblockTemplate( wikitext, appealReason, hasUsernameParameter = false ) {
190+
if ( hasUsernameParameter ) {
191+
const matches = this.getUsernameRequestMatches( wikitext, appealReason );
192+
if ( matches.length === 0 ) {
193+
throw new Error( 'Searching for target text failed' );
194+
}
195+
return matches[ 0 ][ 1 ];
196+
}
140197
const nowikiRanges = this.getNowikiRanges( wikitext );
141198

142199
// Find all {{unblock...|reason=... patterns using matchAll
143200
const structuredMatches = [ ...wikitext.matchAll( /\{\{unblock[^}]*\|reason\s*=\s*/gi ) ].filter(
144-
( match ) => !this.isInsideNowiki( match.index, nowikiRanges ) &&
145-
( !isSpamUn || /^\{\{unblock-spamun\s*\|/i.test( match[ 0 ] ) )
201+
( match ) => !this.isInsideNowiki( match.index, nowikiRanges )
146202
);
147203

148204
// Try each structured match to see if the reason after it matches appealReason
149205
for ( const unblockReasonMatch of structuredMatches ) {
150206
const reasonStartPos = unblockReasonMatch.index + unblockReasonMatch[0].length;
151-
const reasonPattern = new RegExp( this.getAppealReasonPattern( appealReason, isSpamUn ) );
207+
const reasonPattern = new RegExp( this.getAppealReasonPattern( appealReason ) );
152208
const reasonText = wikitext.substring( reasonStartPos );
153209
const reasonMatch = reasonText.match( reasonPattern );
154210

@@ -179,7 +235,7 @@ export class UnblockReview {
179235
const matchPos = reasonStartPos + reasonMatch.index;
180236

181237
// Verify the match is within this template (before the closing }})
182-
if ( matchPos < closePos && ( !isSpamUn || matchPos + reasonMatch[ 0 ].length <= closePos ) ) {
238+
if ( matchPos < closePos ) {
183239
const initialText = wikitext.slice( unblockReasonMatch.index, matchPos );
184240

185241
if ( !initialText.match( /^\{\{unblock/i ) ) {
@@ -196,7 +252,7 @@ export class UnblockReview {
196252
// Isolate the reason, stripping out all template syntax. So `{{Unblock|reason=ABC}}` becomes matches = [ 'ABC ']
197253
// eslint-disable-next-line no-useless-concat
198254
const negativeLookbehinds = '(?<!<' + 'nowiki>{{unblock\\|reason=)(?<!reviewed ?\\|1=)';
199-
const regEx = new RegExp( negativeLookbehinds + this.getAppealReasonPattern( appealReason, isSpamUn ), 'g' );
255+
const regEx = new RegExp( negativeLookbehinds + this.getAppealReasonPattern( appealReason ), 'g' );
200256
let matches = wikitext.matchAll( regEx );
201257
matches = [ ...matches ];
202258

@@ -226,9 +282,6 @@ export class UnblockReview {
226282
}
227283

228284
const initialText = wikitext.slice( potentialStart, matchPos );
229-
if ( isSpamUn && !/^\{\{unblock-spamun\s*\|[^{}]*$/i.test( initialText ) ) {
230-
continue;
231-
}
232285

233286
// If this is an unblock template, we found it
234287
if ( initialText.match( /^\{\{unblock/i ) ) {
@@ -281,23 +334,24 @@ export class UnblockReview {
281334
* Return a regex pattern that matches appeal reason wikitext with tags, wikilinks, templates, or emphasis.
282335
*
283336
* @param {string} appealReason - The rendered appeal text.
284-
* @param {boolean} isSpamUn - Whether the request includes a separate username parameter.
337+
* @param {boolean} hasUsernameParameter - Whether the request includes a separate username parameter.
285338
* @return {string} Regex pattern for matching the original wikitext.
286339
*/
287-
getAppealReasonPattern( appealReason, isSpamUn = false ) {
340+
getAppealReasonPattern( appealReason, hasUsernameParameter = false ) {
288341
// Matches tags, wikilink markup, templates, and emphasis apostrophes between rendered characters.
289342
// Template pattern allows both opening {{ and closing }} to appear between characters,
290343
// since rendered text from {{u|username}} renders as just "username" with the template markup invisible.
291344
// The brace depth check in getLeftHalfOfUnblockTemplate() ensures we don't match inside nested templates.
292345
const markup = '(?:<\\/?[a-zA-Z][a-zA-Z0-9:-]*(?:\\s+(?:"[^"]*"|\'[^\']*\'|[^\'"<>])*)?\\s*\\/?>|\\[\\[[^\\[\\]|\\n]*\\||\\[\\[|\\]\\]|\'{2,}(?!\')|\\{[^{}]*\\}|\\{\\{[^}]*\\}\\}|\\}\\})*';
293-
// The HTML omits whitespace at the start of the second spam-unblock parameter.
294-
let usernameSeparator = isSpamUn;
346+
// The HTML omits parameter names and whitespace around the username separator.
347+
let usernameSeparator = hasUsernameParameter;
295348
return Array.from( appealReason, ( character ) => {
296349
const isSeparator = usernameSeparator && character === '|';
297350
if ( isSeparator ) {
298351
usernameSeparator = false;
352+
return markup + '\\s*\\|\\s*(?:(?:reason|2)\\s*=\\s*)?';
299353
}
300-
return markup + this.escapeRegExp( character ) + ( isSeparator ? '\\s*' : '' );
354+
return markup + this.escapeRegExp( character );
301355
} ).join( '' );
302356
}
303357

‎UnblockReview/tests/UnblockReview-HTMLWikitext.test.js‎

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import { readFileSync } from 'fs';
1111
const unblockReview = new UnblockReview();
1212
const DEFAULT_DECLINE_REASON = `{{subst:Decline reason here}}`;
1313

14-
async function clickReviewButton( wikitext, html, action = 'decline', spamun = false ) {
14+
async function clickReviewButton( wikitext, html, action = 'decline', hasUsernameParameter = false ) {
1515
document.body.innerHTML = html;
16-
if ( spamun ) {
16+
if ( hasUsernameParameter ) {
1717
// jsdom does not parse CSS variables in the background shorthand.
1818
Object.defineProperty( document.querySelector( '.user-block' ).style, 'background', {
1919
value: 'var(--background-color-progressive-subtle, #f1f4fd)'
@@ -113,6 +113,34 @@ describe( 'UnblockReview - Mixed HTML/Wikitext scenarios', () => {
113113
expect( windowMock.location.reload ).not.toHaveBeenCalled();
114114
} );
115115

116+
test( 'Declining an unblock-un request preserves its named username and reason', async () => {
117+
const wikitext = `{{unblock-un|1=AleahP|reason=Test}}`;
118+
const html = `<div class="user-block unblock unblock-un">
119+
<div></div><hr><p><b>Requested username:</b></p>
120+
<div><a class="userlink">AleahP</a> (<a>talk</a> · <a>account availability check</a> · <a>rename user</a>)</div>
121+
<b>Request reason:</b><div>Test</div>
122+
</div>`;
123+
const expected = `{{unblock-un reviewed|decline={{subst:Decline reason here}} ~~~~|1=AleahP|reason=Test}}`;
124+
const { mw, postWithToken, windowMock } = await clickReviewButton( wikitext, html, 'decline', true );
125+
expect( mw.notify ).not.toHaveBeenCalled();
126+
expect( postWithToken ).toHaveBeenCalledWith( 'csrf', expect.objectContaining( { text: expected } ) );
127+
expect( windowMock.location.reload ).toHaveBeenCalled();
128+
} );
129+
130+
test( 'Accepting an unblock-un request preserves its positional username and reason', async () => {
131+
const wikitext = `{{unblock-un|AleahP|\nTest}}`;
132+
const html = `<div class="user-block unblock unblock-un">
133+
<div></div><hr><p><b>Requested username:</b></p>
134+
<div><a class="userlink">AleahP</a> (<a>talk</a>)</div>
135+
<b>Request reason:</b><div>Test</div>
136+
</div>`;
137+
const expected = `{{unblock-un reviewed|accept=~~~~|AleahP|2=\nTest}}`;
138+
const { mw, postWithToken, windowMock } = await clickReviewButton( wikitext, html, 'accept', true );
139+
expect( mw.notify ).not.toHaveBeenCalled();
140+
expect( postWithToken ).toHaveBeenCalledWith( 'csrf', expect.objectContaining( { text: expected } ) );
141+
expect( windowMock.location.reload ).toHaveBeenCalled();
142+
} );
143+
116144
test.each( [ 'decline', 'accept' ] )( 'Clicking %s on a spam-unblock request uses the username and full reason', async ( action ) => {
117145
const wikitext = `{{unblock-spamun|CALorenz|Test}}\n{{unblock-spamun|CALorenz|Other}}`;
118146
const html = `<div class="user-block unblock unblock-un">

0 commit comments

Comments
 (0)