Skip to content

Commit 76fb9d1

Browse files
author
Mike Taylor
committed
Issue #741. Hide "From webcompat" message from UI
1 parent 9455b26 commit 76fb9d1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

webcompat/static/js/lib/issues.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,21 @@ issues.BodyView = Backbone.View.extend({
140140
render: function() {
141141
this.$el.html(this.template(this.model.toJSON()));
142142
// hide metadata
143-
$('.js-Issue-markdown')
143+
var issueDesc = $('.js-Issue-markdown');
144+
issueDesc
144145
.contents()
145146
.filter(function() {
146147
//find the bare html comment-ish text nodes
147148
return this.nodeType === 3 && this.nodeValue.match(/<!--/);
148149
//and hide them
149150
}).wrap('<p class="is-hidden"></p>');
151+
152+
// this is probably really slow, but it's the safest way to not hide user data
153+
issueDesc
154+
.find('p:last-of-type em:contains(From webcompat.com)')
155+
.parent()
156+
.addClass('is-hidden');
157+
150158
this.QrView.setElement('.wc-QrCode').render();
151159
return this;
152160
}

0 commit comments

Comments
 (0)