Skip to content

Commit

Permalink
Fixed color text + skip IP leaking warning in non html mail preview
Browse files Browse the repository at this point in the history
  • Loading branch information
UwUDev committed Sep 30, 2024
1 parent eabe7c4 commit e74cb45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h1 id="email-subject">Loading...</h1>
<pre id="raw-data"></pre>
</div>

<a id="toggle-button" class="button warning">Load mail (will use your IP)</a>
<a id="toggle-button" class="button warning">Load mail (can leak your IP)</a>
</div>

<script>
Expand Down Expand Up @@ -113,6 +113,9 @@ <h1 id="email-subject">Loading...</h1>
} else {
const doc = bodyPreview.contentDocument || bodyPreview.contentWindow.document;
doc.body.innerText = mail.body;
doc.body.style.color = '#fff';
// skip IP leaking warning because it's raw text
document.getElementById('toggle-button').click();
}
document.getElementById('raw-data').innerText = mail.data;
}
Expand Down

0 comments on commit e74cb45

Please sign in to comment.