Feature Request: Add an [CC=email] similar to [TO=email]
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- desktop
调研方向
The change belongs in quicktextParser.mjs: add 'CC' to allowedTags, mirror the existing process_to and get_to pair with process_cc and get_cc, and add a case 'cc': to the tag switch in parse. Check how the TO handling reads this.mData and getDetails() first, because the reporter's snippet may not match the current code. Done means a template containing [[CC=email]] renders the CC addresses as [[TO=email]] does.
由索引模型根据 Issue 内容生成。
描述
Greetings.
Sorry for my bad english.
I suggest adding an [CC=email] field similar to [TO=email].
Template for insert in mail body looks like:
To: [[TO=email]]
CC: [[CC=email]]
Now I have to manually edit quicktextParser.mjs inside .xpi every time after addon's auto-update:
-
Add to
const allowedTags:
... , 'CC', ... -
After
process_toandget_toblocks and beforeasync parse(aStr) {block add:
(I add in a simpler format - without asking for full name - I only need to extract the addresses themselves, separated by commas):
async process_cc(aVariables) {
if (this.mData['CC'] && this.mData['CC'].checked)
return this.mData['CC'].data;
this.mData['CC'] = {};
this.mData['CC'].checked = true;
this.mData['CC'].data = { email: [] };
let details = await this.getDetails();
let emailAddresses = Array.isArray(details.cc) ? details.cc : (details.cc ? [details.cc] : []);
for (let i = 0; i < emailAddresses.length; i++) {
let contactData = await utils.parseDisplayName(emailAddresses[i]);
this.mData['CC'].data.email.push(contactData.email.toLowerCase());
}
return this.mData['CC'].data;
}
async get_cc(aVariables) {
let data = await this.process_cc(aVariables);
if (typeof data[aVariables[0]] != 'undefined') {
let mainSep = (aVariables.length > 1) ? aVariables[1].replace(/\n/g, "\n").replace(/\t/g, "\t") : ", ";
let lastSep = (aVariables.length > 2) ? aVariables[2].replace(/\n/g, "\n").replace(/\t/g, "\t") : mainSep;
let entries = data[aVariables[0]].slice(0);
let last = entries.pop();
let all = [];
if (entries.length > 0) all.push(entries.join(mainSep));
if (last) all.push(last);
return all.join(lastSep);
}
return "";
}
- Add to
switch (tags[i].tagName.toLowerCase()) {:
case 'cc':
Thanks for the great addon - it really helps in my work.
- 主要语言
- JavaScript
- 星标
- 283
- 派生
- 62
- 平均合并
- 1 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jobisoft/quicktext 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 60/100
-
need feedback
难度 4/5 1-2 天 新手友好度 22/100
-
announcement
难度 5/5 一周以上 新手友好度 12/100
-
难度 4/5 3-5 天 新手友好度 22/100
-
难度 2/5 1-3 小时 新手友好度 25/100
查看 jobisoft/quicktext 的全部 Issue
相似的 Issue
-
content
难度 1/5 1 小时以内 新手友好度 88/100
StudentSuite/awesome-study-resources#545 · 1 条评论 ·
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
刪除對於電話號碼與停車編號的限定未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
Fei2411/DeepSeek-Bot#2148 ·
-
feature request
难度 2/5 1-3 小时 新手友好度 62/100
linuxmint/cinnamon-spices-desklets#1964 ·
维护者通常 1 天内回复