Copia la tabella di Google Ads come TSV
Un'azione della barra copia la tabella visibile come TSV pronta da incollare in un foglio di calcolo.
Codice da copiare
/* Action: copy the visible table as TSV to the clipboard */
(function () {
try {
var table = document.querySelector('table');
if (!table) { alert('No table found on this page.'); return; }
var lines = [];
table.querySelectorAll('tr').forEach(function (tr) {
var cells = tr.querySelectorAll('th, td');
if (!cells.length) return;
var row = [];
cells.forEach(function (c) {
row.push((c.innerText || '').replace(/\s+/g, ' ').trim());
});
lines.push(row.join('\t'));
});
var tsv = lines.join('\n');
navigator.clipboard.writeText(tsv).then(function () {
alert('Copied ' + lines.length + ' rows as TSV.');
}, function () {
alert('Clipboard copy was blocked by the browser.');
});
} catch (e) {
alert('Could not copy the table: ' + e.message);
}
})();
Come usare questo esempio
- Copia il codice con il pulsante qui sopra.
- Installa JustZix (2 minuti) e apri l'estensione sulla pagina di destinazione.
- Aggiungi una nuova regola corrispondente a quella pagina.
- Attiva il pannello azioni, aggiungi un pulsante nella scheda Azioni e incollaci il codice — lo avvii con un clic.
Valuta questo esempio
Nessuna valutazione — sii il primo.