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
Fixes #1011: Don't show 'Your submission will be automatically signed… #4711
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test this on a local setup?
static/js/common/upload-addon.js
Outdated
@@ -429,7 +429,8 @@ | |||
$("<strong>").text(message).appendTo(upload_results); | |||
|
|||
// Specific messages for unlisted addons. | |||
if (isUnlisted()) { | |||
var validation_type = results.validation.detected_type | |||
if ((validation_type == 'extension' || validation_type == 'dictionary' || validation_type == 'languagepack') && isUnlisted()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do if (["extension", "dictionary", "languagepack"].includes(validation_type) && isUnlisted())
(I think 😆 - my javascript is really rusty)
We generally use double quotes "
in our javascript, by convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I'll update this
e5f62ae
to
4b29c7d
Compare
static/js/common/upload-addon.js
Outdated
@@ -429,7 +429,8 @@ | |||
$("<strong>").text(message).appendTo(upload_results); | |||
|
|||
// Specific messages for unlisted addons. | |||
if (isUnlisted()) { | |||
var validation_type = results.validation.detected_type | |||
if (["extension", "dictionary", "languagepack"].includes(validation_type) && isUnlisted()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because .includes
is quite a new addition to JavaScript can you change to use .indexOf
instead? Sorry!
f8e0d00
to
7691e15
Compare
static/js/common/upload-addon.js
Outdated
@@ -429,7 +429,8 @@ | |||
$("<strong>").text(message).appendTo(upload_results); | |||
|
|||
// Specific messages for unlisted addons. | |||
if (isUnlisted()) { | |||
var validation_type = results.validation.detected_type | |||
if (["extension", "dictionary", "languagepack"].indexOf(validation_type) && isUnlisted()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.indexOf
returns an index or -1
if not in the list (what's written would test if validation_type wasn't "extension", because that's index=0, so would be true for not in the list or index=1 or index=2).
["extension", "dictionary", "languagepack"].indexOf(validation_type) != -1
….' for add-on types we don't sign
7691e15
to
c35d984
Compare
Thanks @lavish205! |
….' for add-on types we don't sign
mozilla/addons#1669