<button id="set-notranslate-class-fot-table-cell-button">Set «notranslate» class for table cells</button>
<script>
document.addEventListener('DOMContentLoaded', () => {
const button = document.querySelector('#set-notranslate-class-fot-table-cell-button');
if (!button) return;
button.addEventListener('click', () => {
const htmlString = prompt('Enter your HTML table');
if (!htmlString || !htmlString.trim().length) return;
const container = document.createElement('div');
container.innerHTML = htmlString;
container.querySelectorAll('tbody tr').forEach((row, rowIndex) => {
row.querySelectorAll('td').forEach((cell, cellIndex) => {
if (cellIndex) cell.classList.add('notranslate');
});
});
prompt('Take your prepared table', container.innerHTML);
});
});
</script>