Fixes #2409. Don't pre-fill forms for "self reports" (webcompat.com)#2439
Fixes #2409. Don't pre-fill forms for "self reports" (webcompat.com)#2439
Conversation
webcompat/static/js/lib/bugform.js
Outdated
| // 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 comment was marked as abuse.
Sorry, something went wrong.
webcompat/static/js/lib/bugform.js
Outdated
| 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.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
webcompat/static/js/lib/bugform.js
Outdated
| }; | ||
|
|
||
| // Is the user trying to report a site against webcompat.com itself? | ||
| this.isSelfReport = function() { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
|
Thanks for review @Regaddi, hoping I can make changes today or tomorrow. |
lol |
|
Need help? 🙂 @miketaylr |
@Regaddi yeah... would you mind taking over the PR? Been swamped with other projects. >_< |
|
LGTM now. @miketaylr |
|
(just confirmed working locally as expected) |
r? @Regaddi