(function(exports) { if (location != 'chrome://messenger/content/messenger.xhtml') return; const { ThreadPaneColumns } = ChromeUtils.importESModule("chrome://messenger/content/ThreadPaneColumns.mjs"); let myAddr=new Array(); for (const acct of MailServices.accounts.accounts) for (const iden of acct.identities) myAddr.push(iden.fullAddress); //.email myAddr=[...new Set(myAddr)]; function easyPeasy_addColumn(id, name, callback) { console.log('add column "'+name+'"'); if (ThreadPaneColumns.getColumn(id)) ThreadPaneColumns.removeCustomColumn(id); ThreadPaneColumns.addCustomColumn(id, { name: name, hidden: false, //initiallyHidden, icon: false, resizable: true, sortable: true, textCallback: callback, }); } easyPeasy_addColumn('EasyPeasy_DateTime', 'Datum      Zeit', (message)=>{ const date=new Date(); date.setTime(message.date/1000); return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit"})+'  '+date.toLocaleTimeString().substring(0,5); }); easyPeasy_addColumn('EasyPeasy_Adressen', 'Mailadresse', (message)=>{ let addr; if (myAddr.includes(message.mime2DecodedAuthor)) addr=message.mime2DecodedRecipients; //outgoing else addr=message.mime2DecodedAuthor; //incoming return MailServices.headerParser .parseDecodedHeader(addr) .map(hdr => hdr.email || undefined).join('; '); }); easyPeasy_addColumn('EasyPeasy_Namen', 'Name', (message)=>{ let addr; if (myAddr.includes(message.mime2DecodedAuthor)) addr=message.mime2DecodedRecipients; //outgoing else addr=message.mime2DecodedAuthor; //incoming return MailServices.headerParser .parseDecodedHeader(addr) .map(hdr => hdr.name || undefined).join('; '); }); easyPeasy_addColumn('EasyPeasy_Gesendet', 'Gesendet', (message)=>{ return ''; //needs css: //tr[data-properties~="outgoing"] .easypeasy_gesendet-column { // background: no-repeat center url("chrome://messenger/skin/icons/new/circle-sm.svg"); //} //ein Icon aus dem Thunderbird Fundus, weitere Icons siehe: //https://searchfox.org/comm-central/source/mail/themes/shared/mail/icons/new/compact }); })(this);