//https://www.boe.es/buscar/act.php?id=BOE-A-2002-18099
function copyToClipboard(text) {
const el = document.createElement('textarea');
el.value = text;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
console.log('Data copied to clipboard.');
}
var headers = document.querySelectorAll('h3, h4, h5');
var plainText = '';
for (var i = 0; i < headers.length; i++) {
var header = headers[i];
var correspondingParagraph = header.nextElementSibling;
while (correspondingParagraph) {
if (
correspondingParagraph.nodeName === 'P' &&
correspondingParagraph.classList.length > 0 &&
correspondingParagraph.textContent.includes('tierra')
) {
plainText += header.textContent + ': ' + correspondingParagraph.textContent + '\n';
break;
}
correspondingParagraph = correspondingParagraph.nextElementSibling;
}
}
copyToClipboard(plainText);
martes, 6 de junio de 2023
capítulos del REBT 842/2002 en los que se menciona "tierra" > to be run as prompt in Console DevTools
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario