I think I solved the problem for the “Uncheck All”-Action, maybe not that nicely but it works:

const findRegex = /- \[x]/g;
const replaceWith = “- [ ]”;
draft.content = draft.content.replace(findRegex, replaceWith);

const findRegex2 = /🔌/g;
const replaceWith2 = “🔋”;
draft.content = draft.content.replace(findRegex2, replaceWith2);
draft.update();

Also I changed in the “What should I charge” script this:

let packingList = draft.content.replace(‘# ‘ + draft.title, ”).split(“\n”).forEach(function (item) {
if (item.includes(‘[ ]’) && item.includes(‘🔋’)) {
prompt.addButton(item.replace(‘- [ ]’, ”).replace(‘🔋’, ”).trim())
}
});

And last but not least in “Charge” there was also something not working, looks like this now (the entire replaceText part):

replaceText = lnText;
if (lnText.endsWith(‘🔋’)) {
replaceText = lnText.replace(‘🔋’, ‘🔌’);
} else if (lnText.endsWith(‘🔌’)) {
replaceText = lnText.replace(‘🔌’, ‘🔋’);
} else {
replaceText = lnText + ‘ 🔋’ ;
}