Skip to content

Commit 304ebd6

Browse files
committed
Fix multiple headers display on TB102+
Fixes: #9
1 parent aeb1c27 commit 304ebd6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

experiments/displayReceivedHeader.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ var displayReceivedHeader = class extends ExtensionCommon.ExtensionAPI {
4747
element.appendChild(headerRowTitleLabel);
4848
}
4949

50-
const expandedReceivedBox = document.createElement("td");
50+
const expandedReceivedBox = document.createElement("div");
5151
expandedReceivedBox.id = "expandedReceivedBox";
5252

53-
const headerRowValue = document.createElement("span");
53+
const headerRowValue = document.createElement("div");
5454
headerRowValue.id = "receivedReceivedHeader";
5555

5656
expandedReceivedBox.appendChild(headerRowValue);
@@ -96,7 +96,7 @@ var displayReceivedHeader = class extends ExtensionCommon.ExtensionAPI {
9696
const document = getDocumentByTabId(tabId);
9797
if (!document) return;
9898

99-
const headerRowValue = document.createElement("span");
99+
const headerRowValue = document.createElement("div");
100100
headerRowValue.id = "receivedReceivedHeader";
101101

102102
function initMailHeaderfield() {
@@ -120,8 +120,9 @@ var displayReceivedHeader = class extends ExtensionCommon.ExtensionAPI {
120120

121121
headerRowValue.appendChild(mailHeaderfield);
122122
} else {
123-
headersArray.forEach(function (header) {
123+
headersArray.forEach(function (header, i) {
124124
const mailHeaderfield = initMailHeaderfield();
125+
if (i !== 0 && majorVersion > 78) mailHeaderfield.style.marginTop = "3px";
125126
header.forEach(function (string) {
126127
mailHeaderfield.textContent += string;
127128
});

0 commit comments

Comments
 (0)