add class to <pre> blocks

This commit is contained in:
Zlatin Balevsky
2019-12-16 22:25:10 +00:00
parent ea5da2431a
commit 5375b7aec0
3 changed files with 7 additions and 7 deletions

View File

@ -298,7 +298,7 @@ function showComment(infoHash) {
var commentSpan = document.getElementById("comment-"+infoHash)
var comment = resultsByInfoHash.get(infoHash).comment
commentSpan.innerHTML = "<pre>" + comment + "</pre>"
commentSpan.innerHTML = "<pre class='comment'>" + comment + "</pre>"
}
function hideComment(infoHash) {

View File

@ -45,7 +45,7 @@ class Certificate {
var link = "<a href='#' onclick='window.hideCertificateComment(\"" + this.divId + "\",\"" + this.base64 + "\");return false;'>" + linkText + "</a>"
var html = "<div id='certificate-comment-link-" + id + "'>" + link + "</div>"
html += "<div id='certificate-comment-" + id + "'>"
html += "<pre>" + this.comment + "</pre>"
html += "<pre class='comment'>" + this.comment + "</pre>"
html += "</div>"
return html
} else {
@ -178,7 +178,7 @@ function showCertificateComment(divId, base64) {
linkDiv.innerHTML = link
var commentDiv = document.getElementById("certificate-comment-" + divId + "_" + base64)
var commentHtml = "<pre>" + certificate.comment + "</pre>"
var commentHtml = "<pre class='comment'>" + certificate.comment + "</pre>"
commentDiv.innerHTML = commentHtml
}

View File

@ -156,7 +156,7 @@ class ResultFromSender {
html += "</a>"
html += "</div>"
html += "<div id='comment-" + this.infoHash + "'>"
html += "<pre>" + this.comment + "</pre>"
html += "<pre class='comment'>" + this.comment + "</pre>"
html += "</div>"
return html
} else {
@ -312,7 +312,7 @@ class SenderForResult {
html += "</a>"
html += "</div>"
html += "<div id='comment-" + this.b64 + "'>"
html += "<pre>" + this.comment + "</pre>"
html += "<pre class='comment'>" + this.comment + "</pre>"
html += "</div>"
return html
} else {
@ -470,7 +470,7 @@ function showCommentBySender(infoHash) {
var commentText = resultsFromSender.resultsMap.get(infoHash).comment
var commentDiv = document.getElementById("comment-" + infoHash);
var comment = "<pre>"+ commentText + "</pre>";
var comment = "<pre class='comment'>"+ commentText + "</pre>";
commentDiv.innerHTML = comment
@ -486,7 +486,7 @@ function showCommentByFile(b64) {
var commentText = sendersForResult.sendersMap.get(b64).comment
var commentDiv = document.getElementById("comment-" + b64)
var comment = "<pre>" + commentText + "</pre>"
var comment = "<pre class='comment'>" + commentText + "</pre>"
commentDiv.innerHTML = comment
var hideLink = "<a href='#' onclick='window.hideComment(\"" + b64 + "\");return false;'>" + _t("Hide Comment") + "</a>";