From 257e210f61f1d6dcdc9bdaf5e56e31ed3e6c4f7c Mon Sep 17 00:00:00 2001 From: fredster33 Date: Wed, 13 Nov 2024 16:46:19 -0800 Subject: [PATCH] tag: add {{Maybe free media}} and {{Fake SVG}} for files (#2041) * 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 Co-authored-by: NovemLinguae <79697282+NovemLinguae@users.noreply.github.com> --- modules/friendlytag.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/friendlytag.js b/modules/friendlytag.js index e3088ea46..22990abae 100644 --- a/modules/friendlytag.js +++ b/modules/friendlytag.js @@ -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' } ], @@ -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', @@ -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' }, @@ -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; @@ -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}}