Skip to content

Commit

Permalink
Issue #741. Hide "From webcompat" message from the webcompat issue UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Apr 4, 2016
1 parent 9455b26 commit cd26fb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions webcompat/static/css/development/components/issue.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
word-wrap: break-word;
}

/* Used to hide "Reported on webcompat.com" */
.wc-is-hidden {
display: none;
}

@media all and (max-width: 28.12em) {

.wc-Issue-title {
Expand Down
10 changes: 9 additions & 1 deletion webcompat/static/js/lib/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,21 @@ issues.BodyView = Backbone.View.extend({
render: function() {
this.$el.html(this.template(this.model.toJSON()));
// hide metadata
$('.js-Issue-markdown')
var issueDesc = $('.js-Issue-markdown');
issueDesc
.contents()
.filter(function() {
//find the bare html comment-ish text nodes
return this.nodeType === 3 && this.nodeValue.match(/<!--/);
//and hide them
}).wrap('<p class="is-hidden"></p>');

// this is probably really slow, but it's the safest way to note hide user data
issueDesc
.find('p:last-of-type em:contains(From webcompat.com)')
.parent()
.addClass('is-hidden');

this.QrView.setElement('.wc-QrCode').render();
return this;
}
Expand Down

0 comments on commit cd26fb0

Please sign in to comment.