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

Fixes #1011: Don't show 'Your submission will be automatically signed… #4711

Merged
merged 1 commit into from Feb 21, 2017

Conversation

lavish205
Copy link
Contributor

….' for add-on types we don't sign
mozilla/addons#1669

Copy link
Member

@eviljeff eviljeff left a 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?

@@ -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()) {
Copy link
Member

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.

Copy link
Contributor Author

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

@@ -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()) {
Copy link
Member

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!

@lavish205 lavish205 force-pushed the issue_1011 branch 2 times, most recently from f8e0d00 to 7691e15 Compare February 18, 2017 01:30
@@ -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()) {
Copy link
Member

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

@eviljeff eviljeff merged commit 41db453 into mozilla:master Feb 21, 2017
@caitmuenster
Copy link

Thanks @lavish205!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants