Copiar IDs de productos rechazados
Recopila los IDs de todos los productos rechazados de la página y los copia al portapapeles, uno por línea.
Código para copiar
(function () {
var ids = [];
var rows = document.querySelectorAll('table tbody tr, [role="row"]');
rows.forEach(function (row) {
var txt = (row.textContent || '');
if (!/disapproved|not approved/i.test(txt)) return;
var idCell = row.querySelector('[data-item-id], [aria-label*="item id" i], code');
var id = idCell ? (idCell.getAttribute('data-item-id') || idCell.textContent || '') : '';
if (!id) {
var first = row.querySelector('td, [role="gridcell"], [role="cell"]');
id = first ? first.textContent.trim() : '';
}
id = id.trim();
if (id) ids.push(id);
});
if (!ids.length) { alert('No disapproved items found on this page.'); return; }
navigator.clipboard.writeText(ids.join('\n')).then(function () {
alert('Copied ' + ids.length + ' disapproved item ID(s) to the clipboard.');
}, function () {
alert('Could not access the clipboard.');
});
})();
Cómo usar este ejemplo
- Copia el código con el botón de arriba.
- Instala JustZix (2 minutos) y abre la extensión en la página de destino.
- Añade una nueva regla que coincida con esa página.
- Activa el panel de acciones, añade un botón en la pestaña Acciones y pega el código en él — lo ejecutas con un clic.
Valora este ejemplo
Sin valoraciones — sé el primero.