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 #2409. Don't pre-fill forms for "self reports" (webcompat.com) #2439

Merged
merged 3 commits into from
Jun 6, 2018

Conversation

miketaylr
Copy link
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.

@@ -18,6 +18,7 @@ function BugForm() {
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.

@@ -182,18 +193,28 @@ function BugForm() {
img.src = dataURI;
};

// 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
Member Author

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

@miketaylr
Copy link
Member Author

hoping I can make changes today or tomorrow.

lol

@Regaddi
Copy link
Member

Regaddi commented Jun 1, 2018

Need help? 🙂 @miketaylr

@miketaylr
Copy link
Member Author

Need help? 🙂 @miketaylr

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

@Regaddi
Copy link
Member

Regaddi commented Jun 2, 2018

LGTM now. @miketaylr

Copy link
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
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