Copy order numbers
Collects every order number from the current seller-panel list and copies them to the clipboard, ready to paste.
Code to copy
try {
var nums = [];
document.querySelectorAll('[data-role="order-row"], tr').forEach(function (row) {
try {
var m = (row.textContent || '').match(/\b\d{8,}\b/);
if (m) nums.push(m[0]);
} catch (e) {}
});
var text = Array.from(new Set(nums)).join('\n');
if (!text) { alert('Nie znaleziono numerow zamowien.'); }
else if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(function () {
alert('Skopiowano ' + nums.length + ' numerow zamowien.');
});
} else {
alert(text);
}
} catch (e) { alert('Blad: ' + e.message); }
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Enable the action panel, add a button in the Actions tab and paste the code into it — run it with one click.
Rate this example
No ratings yet — be the first.