mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-25 10:41:55 +02:00
Add text summary
This commit is contained in:
@@ -24,14 +24,15 @@
|
|||||||
var headers = !mail.headers ? '' : $('<pre style="border: 1px solid #ddd; padding: 5px;" />')
|
var headers = !mail.headers ? '' : $('<pre style="border: 1px solid #ddd; padding: 5px;" />')
|
||||||
.append($('<code />').text(mail.headers));
|
.append($('<code />').text(mail.headers));
|
||||||
|
|
||||||
|
var body = $('<pre style="border: 1px solid #ddd; padding: 5px;" />').text(mail.body)
|
||||||
|
var html = null;
|
||||||
if (mail.html) {
|
if (mail.html) {
|
||||||
var body = $('<iframe width="100%" height="400px" sandbox="" referrerpolicy="no-referrer"/>').attr("srcdoc", mail.html)
|
body = $('<details />').append($('<summary>Text version</summary>')).append(body);
|
||||||
} else {
|
html = $('<iframe width="100%" height="400px" sandbox="" referrerpolicy="no-referrer"/>').attr("srcdoc", mail.html)
|
||||||
var body = $('<pre style="border: 1px solid #ddd; padding: 5px;" />').text(mail.body)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
documentToWriteTo.open();
|
documentToWriteTo.open();
|
||||||
documentToWriteTo.write(headers.prop('outerHTML') + body.prop('outerHTML'));
|
documentToWriteTo.write(headers.prop('outerHTML') + body.prop('outerHTML') + (html ? html.prop('outerHTML') : ''));
|
||||||
documentToWriteTo.close();
|
documentToWriteTo.close();
|
||||||
}).addClass(csscls('editor-link')).appendTo(header);
|
}).addClass(csscls('editor-link')).appendTo(header);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user