diff --git a/web/js/opentrashmail.js b/web/js/opentrashmail.js index 4694fdc..542009b 100644 --- a/web/js/opentrashmail.js +++ b/web/js/opentrashmail.js @@ -91,9 +91,14 @@ function updateEmailTable() { clearInterval(timer); admin = true; - $('#tableheader').children(':eq(1)').after('To'); + // Do not add the To header if one with the "to" class already exists + if ( $('#tableheader').children(':eq(2)').hasClass("to") === false ) + { + $('#tableheader').children(':eq(1)').after('To'); + } } + $("#emailtable tr").remove(); // Empty all from the table so we don't stack if(Object.keys(data.emails).length>0) for(em in data.emails) {