Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag: add {{Maybe free media}} and {{Fake SVG}} for files #2041

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading