Proposal for a schema change to support multiline scripts as an array of strings for improved readability.
of course, the stitching together of the lines will need to be implemented in the app as well.
the idea is to turn this:
{
"action": "extractAll",
"script": "Array.from(Array.from(document.querySelectorAll('h2')).filter(el => el.textContent.startsWith('Invoices'))[0].closest('div').querySelectorAll('table tbody tr')).map(row => { const cells = row.querySelectorAll('td'); const date = cells[0].innerText.trim(); const total = cells[1].innerText.trim(); const url = cells[2].querySelector('a').href; const match = url.match(/receipt\\/([^\\/]+)/); const id = match ? match[1] : null; return { id, date, total, url }; })",
"variable": "item",
...
Proposal for a schema change to support multiline scripts as an array of strings for improved readability. of course, the stitching together of the lines will need to be implemented in the app as well.
the idea is to turn this:
into that: