This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
/* First try to handle pages which are actually raw text of the email. | |
Extract the HTML part and replace page with it */ | |
var orig_html = document.getElementsByTagName('html')[0].textContent; | |
var extracted_html = orig_html; | |
/* Try splitting it up if it's actually the multipart email. Otherwise, work | |
on the document itself, leaving the orig_html in place */ | |
var boundary_pattern = '--==============='; | |
while (extracted_html.indexOf(boundary_pattern) != -1) { | |
var next_boundary = extracted_html.indexOf(boundary_pattern); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
/* First try to handle pages which are actually raw text of the email. | |
Extract the HTML part and replace page with it */ | |
var orig_html = document.getElementsByTagName('html')[0].textContent; | |
var extracted_html = orig_html; | |
/* Try splitting it up if it's actually the multipart email. Otherwise, work | |
on the document itself, leaving the orig_html in place */ | |
var boundary_pattern = '--==============='; | |
while (extracted_html.indexOf(boundary_pattern) != -1) { | |
var next_boundary = extracted_html.indexOf(boundary_pattern); |