Skip to content

Commit

Permalink
tag: add {{Maybe free media}} and {{Fake SVG}} for files (#2041)
Browse files Browse the repository at this point in the history
* Add {{Maybe free media}} and {{Fake SVG}}

* Delete .idea directory (committed by accident)

* revert changes to package-lock.json

* fix linter error

---------

Co-authored-by: NovemLinguae <[email protected]>
Co-authored-by: NovemLinguae <[email protected]>
  • Loading branch information
3 people authored Nov 14, 2024
1 parent 7e9657b commit 257e210
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/friendlytag.js
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,7 @@ Twinkle.tag.redirectList = {
Twinkle.tag.fileList = {
'License and sourcing problem tags': [
{ label: '{{Better source requested}}: source info consists of bare image URL/generic base URL only', value: 'Better source requested' },
{ label: '{{Maybe free media}}: currently tagged under non-free license, but free license may be available ', value: 'Maybe free media' },
{ label: '{{Non-free reduce}}: non-low-resolution fair use image (or too-long audio clip, etc)', value: 'Non-free reduce' },
{ label: '{{Orphaned non-free revisions}}: fair use media with old revisions that need to be deleted', value: 'Orphaned non-free revisions' }
],
Expand Down Expand Up @@ -1236,7 +1237,7 @@ Twinkle.tag.fileList = {
{ label: '{{Bad format}}: PDF/DOC/... file should be converted to a more useful format', value: 'Bad format' },
{ label: '{{Bad GIF}}: GIF that should be PNG, JPEG, or SVG', value: 'Bad GIF' },
{ label: '{{Bad JPEG}}: JPEG that should be PNG or SVG', value: 'Bad JPEG' },
{ label: '{{Bad SVG}}: SVG containing raster graphics', value: 'Bad SVG' },
{ label: '{{Bad SVG}}: SVG with a mix of raster and vector graphics', value: 'Bad SVG' },
{ label: '{{Bad trace}}: auto-traced SVG requiring cleanup', value: 'Bad trace' },
{
label: '{{Cleanup image}}: general cleanup', value: 'Cleanup image',
Expand All @@ -1249,6 +1250,7 @@ Twinkle.tag.fileList = {
}
},
{ label: '{{ClearType}}: image (not screenshot) with ClearType anti-aliasing', value: 'ClearType' },
{ label: '{{Fake SVG}}: SVG solely containing raster graphics without true vector content', value: 'Fake SVG' },
{ label: '{{Imagewatermark}}: image contains visible or invisible watermarking', value: 'Imagewatermark' },
{ label: '{{NoCoins}}: image using coins to indicate scale', value: 'NoCoins' },
{ label: '{{Overcompressed JPEG}}: JPEG with high levels of artifacts', value: 'Overcompressed JPEG' },
Expand Down Expand Up @@ -2099,7 +2101,7 @@ Twinkle.tag.callback.evaluate = function friendlytagCallbackEvaluate(e) {

// Check that selected templates make sense given the file's extension.

// {{Bad GIF|JPEG|SVG}}
// {{Bad GIF|JPEG|SVG}}, {{Fake SVG}}
if (extensionUpper !== 'GIF' && params.tags.includes('Bad GIF')) {
alert('This appears to be a ' + extension + ' file, so {{Bad GIF}} is inappropriate.');
return;
Expand All @@ -2109,6 +2111,9 @@ Twinkle.tag.callback.evaluate = function friendlytagCallbackEvaluate(e) {
} else if (extensionUpper !== 'SVG' && params.tags.includes('Bad SVG')) {
alert('This appears to be a ' + extension + ' file, so {{Bad SVG}} is inappropriate.');
return;
} else if (extensionUpper !== 'SVG' && params.tags.includes('Fake SVG')) {
alert('This appears to be a ' + extension + ' file, so {{Fake SVG}} is inappropriate.');
return;
}

// {{Should be PNG|SVG}}
Expand Down

0 comments on commit 257e210

Please sign in to comment.