Skip to content

Fixes #2409. Don't pre-fill forms for "self reports" (webcompat.com)#2439

Merged
miketaylr merged 3 commits intomasterfrom
issues/2409/1
Jun 6, 2018
Merged

Fixes #2409. Don't pre-fill forms for "self reports" (webcompat.com)#2439
miketaylr merged 3 commits intomasterfrom
issues/2409/1

Conversation

@miketaylr
Copy link
Copy Markdown
Member

@miketaylr miketaylr requested a review from Regaddi May 4, 2018 23:47
// weird Gecko bug. See https://bugzilla.mozilla.org/show_bug.cgi?id=1098037
urlParam = this.trimWyciwyg(urlParam[1]);
this.urlField.val(decodeURIComponent(urlParam));
var url = location.href.match(/url=([^&]*)/);

This comment was marked as abuse.

this.submitTypeInput = $("#submit_type:hidden");
this.uploadLabel = $(".js-label-upload");
this.uploadLoader = $(".js-image-loader");
this.urlParamRegExp = /url=([^&]*)/;

This comment was marked as abuse.

This comment was marked as abuse.

};

// Is the user trying to report a site against webcompat.com itself?
this.isSelfReport = function() {

This comment was marked as abuse.

this.isSelfReport = function() {
var url = location.href.match(this.urlParamRegExp);
if (url !== null) {
if (_.includes(decodeURIComponent(url[0]), location.origin)) {

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@miketaylr
Copy link
Copy Markdown
Member Author

Thanks for review @Regaddi, hoping I can make changes today or tomorrow.

@miketaylr
Copy link
Copy Markdown
Member Author

hoping I can make changes today or tomorrow.

lol

@Regaddi
Copy link
Copy Markdown
Member

Regaddi commented Jun 1, 2018

Need help? 🙂 @miketaylr

@miketaylr
Copy link
Copy Markdown
Member Author

Need help? 🙂 @miketaylr

@Regaddi yeah... would you mind taking over the PR? Been swamped with other projects. >_<

@Regaddi
Copy link
Copy Markdown
Member

Regaddi commented Jun 2, 2018

LGTM now. @miketaylr

Copy link
Copy Markdown
Member Author

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @Regaddi

@miketaylr miketaylr merged commit a8cadca into master Jun 6, 2018
@miketaylr miketaylr deleted the issues/2409/1 branch June 6, 2018 14:52
@miketaylr
Copy link
Copy Markdown
Member Author

(just confirmed working locally as expected)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants