Skip to content

Commit

Permalink
tag: remove {{Now Commons}} (#2073)
Browse files Browse the repository at this point in the history
{{Now Commons}} is a CSD, not a tag.
  • Loading branch information
fredster33 authored Dec 8, 2024
1 parent e38ebe3 commit b6102de
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions modules/twinkletag.js
Original file line number Diff line number Diff line change
Expand Up @@ -1209,16 +1209,6 @@ Twinkle.tag.fileList = {
label: 'Name on Commons:',
tooltip: 'Name of the image on Commons (if different from local name), excluding the File: prefix:'
}
},
{
label: '{{Now Commons}}: file has been copied to Commons',
value: 'Now Commons',
subgroup: {
type: 'input',
name: 'nowcommonsName',
label: 'Commons image name if different:',
tooltip: 'Name of the image on Commons (if different from local name), excluding the File: prefix:'
}
}
],
'Cleanup tags': [
Expand Down Expand Up @@ -1908,19 +1898,13 @@ Twinkle.tag.callbacks = {
let tagtext = '', currentTag;
$.each(params.tags, (k, tag) => {
// when other commons-related tags are placed, remove "move to Commons" tag
if (['Keep local', 'Now Commons', 'Do not move to Commons'].indexOf(tag) !== -1) {
if (['Keep local', 'Do not move to Commons'].indexOf(tag) !== -1) {
text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, '');
}

currentTag = tag;

switch (tag) {
case 'Now Commons':
currentTag = 'subst:' + currentTag; // subst
if (params.nowcommonsName !== '') {
currentTag += '|1=' + params.nowcommonsName;
}
break;
case 'Keep local':
if (params.keeplocalName !== '') {
currentTag += '|1=' + params.keeplocalName;
Expand Down

0 comments on commit b6102de

Please sign in to comment.