Skip to content

Commit

Permalink
Issue #3121 - Remove inline screenshot images
Browse files Browse the repository at this point in the history
Just link to them
  • Loading branch information
Mike Taylor committed Jan 3, 2020
1 parent 4981204 commit e344bcd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
9 changes: 1 addition & 8 deletions webcompat/static/js/lib/bugform.js
Original file line number Diff line number Diff line change
Expand Up @@ -766,14 +766,7 @@ BugForm.prototype.getDataURIFromPreviewEl = function() {
*/
BugForm.prototype.addImageURL = function(response) {
var img_url = response.url;
var thumb_url = response.thumb_url;
var imageURL = [
"[![Screenshot Description](",
thumb_url,
")](",
img_url,
")"
].join("");
var imageURL = ["[Screenshot](", img_url, ")"].join("");

this.stepsToReproduceField.val(function(idx, value) {
return value + "\n" + imageURL;
Expand Down
9 changes: 1 addition & 8 deletions webcompat/static/js/lib/issue-wizard-bugform.js
Original file line number Diff line number Diff line change
Expand Up @@ -1373,14 +1373,7 @@ BugForm.prototype.getDataURIFromPreviewEl = function() {
*/
BugForm.prototype.addImageURL = function(response) {
var img_url = response.url;
var thumb_url = response.thumb_url;
var imageURL = [
"[![Screenshot Description](",
thumb_url,
")](",
img_url,
")"
].join("");
var imageURL = ["[Screenshot](", img_url, ")"].join("");

this.stepsToReproduceField.val(function(idx, value) {
return value + "\n" + imageURL;
Expand Down
9 changes: 1 addition & 8 deletions webcompat/static/js/lib/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,7 @@ issues.ImageUploadView = Backbone.View.extend({
var textarea = $(".js-Comment-text");
var textareaVal = textarea.val();
var img_url = response.url;
var thumb_url = response.thumb_url;
var imageURL = [
"[![Screenshot Description](",
thumb_url,
")](",
img_url,
")"
].join("");
var imageURL = ["[Screenshot](", img_url, ")"].join("");

if (!$.trim(textareaVal)) {
textarea.val(imageURL);
Expand Down

0 comments on commit e344bcd

Please sign in to comment.