this is my scraping tool:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Web Scraping Tool</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #e0e0e0;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            flex-direction: column;
            min-height: 100vh;
            width: 100%;
            box-sizing: border-box;
        }

        h1 {
            color: #333;
            text-align: center;
            width: 100%;
            margin: 20px 0;
        }

        table {
            width: 100%;
            max-width: 1200px;
            border-collapse: collapse;
            margin: 0 auto;
            background-color: #e0e0e0;
            box-shadow: inset 1px 1px 2px #d1d1d1,
                inset -1px -1px 2px #ffffff;
            border-radius: 12px;
            overflow: hidden;
        }

        th,
        td {
            padding: 12px;
            text-align: left;
        }

        th {
            background-color: #e0e0e0;
            box-shadow: inset 1px 1px 2px #d1d1d1,
                inset -1px -1px 2px #ffffff;
            color: #555;
        }

        td {
            background-color: #e0e0e0;
            color: #333;
        }

        input[type="text"] {
            width: calc(100% - 16px);
            padding: 8px;
            border: none;
            border-radius: 8px;
            box-shadow: inset 2px 2px 5px #bebebe,
                inset -2px -2px 5px #ffffff;
            background-color: #e0e0e0;
        }

        button {
            padding: 10px 15px;
            border: none;
            border-radius: 8px;
            background-color: #e0e0e0;
            box-shadow: 5px 5px 10px #bebebe,
                -5px -5px 10px #ffffff;
            cursor: pointer;
            font-size: 14px;
            margin-right: 5px;
        }

        button:hover {
            box-shadow: inset 2px 2px 5px #bebebe,
                inset -2px -2px 5px #ffffff;
        }

        .debug-panel {
            position: fixed;
            top: 8%;
            left: 50%;
            transform: translateX(-50%);
            width: 80%;
            max-height: 400px;
            overflow-y: auto;
            background-color: #e0e0e0;
            box-shadow: 8px 8px 20px #bebebe,
                -8px -8px 20px #ffffff;
            border-radius: 10px;
            padding: 20px;
            display: none;
            z-index: 1000;
        }

        .close-btn {
            float: right;
            cursor: pointer;
            font-weight: bold;
            color: #333;
        }

        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.3);
            display: none;
            z-index: 999;
        }
    </style>
</head>

<body>

    <h1>Web Scraping Tool</h1>
    <table>
        <thead>
            <tr>
                <th>Name</th>
                <th>URL</th>
                <th>Selector</th>
                <th>Result/Error</th>
                <th>Last Execution</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody id="scrape-table-body">
            <!-- Dynamic rows will be added here -->
            <tr>
                <td><input type="text" id="new-name" placeholder="Enter name"></td>
                <td><input type="text" id="new-url" placeholder="Enter URL"></td>
                <td><input type="text" id="new-selector" placeholder="Enter Selector"></td>
                <td colspan="3"><button onclick="addNewRecord()">✚</button></td>
            </tr>
        </tbody>
    </table>

    <div id="overlay" class="overlay" onclick="toggleDebugPanel(null, true)"></div>
    <div id="debug-panel" class="debug-panel">
        <span class="close-btn" onclick="toggleDebugPanel(null, true)">×</span>
        <pre id="debug-content"></pre>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <script>
        const recordsKey = 'scrapeRecords';

        document.addEventListener('DOMContentLoaded', loadRecords);

        function loadRecords() {
            const records = JSON.parse(localStorage.getItem(recordsKey)) || [];
            records.forEach((record, index) => {
                addTableRow(record, index);
                executeRecord(index); // Automatically execute each record on load
            });
        }

        function addTableRow({ name, url, selector }, index) {
            const tableBody = document.getElementById('scrape-table-body');
            const row = document.createElement('tr');

            row.innerHTML = `
                <td><input type="text" value="${name}" onchange="updateRecord(${index}, 'name', this.value)" onkeydown="checkEnter(event, ${index})"></td>
                <td><input type="text" value="${url}" onchange="updateRecord(${index}, 'url', this.value)" onkeydown="checkEnter(event, ${index})"></td>
                <td><input type="text" value="${escapeHtml(selector)}" onchange="updateRecord(${index}, 'selector', this.value)" onkeydown="checkEnter(event, ${index})"></td>
                <td id="result-${index}">⏳</td>
                <td id="timestamp-${index}">⏳</td>
                <td>
                    <button onclick="executeRecord(${index})">▶️</button>
                    <button onclick="removeRecord(${index})">🗑️</button>
                    <button onclick="toggleDebugPanel(${index}, false)">ℹ️</button>
                </td>
            `;
            tableBody.insertBefore(row, tableBody.lastElementChild);
        }

        function checkEnter(event, index) {
            if (event.key === 'Enter') {
                executeRecord(index);
            }
        }

        function addNewRecord() {
            const name = document.getElementById('new-name').value;
            const url = document.getElementById('new-url').value;
            const selector = document.getElementById('new-selector').value;

            if (!name || !url || !selector) {
                alert('All fields are required!');
                return;
            }

            const record = { name, url, selector, result: '', response: '', timestamp: '' };
            let records = JSON.parse(localStorage.getItem(recordsKey)) || [];
            records.push(record);
            localStorage.setItem(recordsKey, JSON.stringify(records));

            const index = records.length - 1;
            addTableRow(record, index);
            executeScraping(url, selector, index);

            document.getElementById('new-name').value = '';
            document.getElementById('new-url').value = '';
            document.getElementById('new-selector').value = '';
        }

        function executeRecord(index) {
            const records = JSON.parse(localStorage.getItem(recordsKey)) || [];
            const { url, selector } = records[index];
            executeScraping(url, selector, index);
        }

        function executeScraping(url, selector, index) {
            document.getElementById(`result-${index}`).textContent = '⏳';
            document.getElementById(`timestamp-${index}`).textContent = '⏳';

            const proxy = 'https://cors-anywhere.herokuapp.com/';
            const options = {
                headers: {
                    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
                    'Accept-Language': 'en-US,en;q=0.9'
                }
            };

            axios.get(proxy + url, options)
                .then(response => {
                    const parser = new DOMParser();
                    const doc = parser.parseFromString(response.data, 'text/html');
                    const resultElement = doc.querySelector(selector);
                    const resultText = resultElement ? resultElement.textContent.trim() : 'No matches';
                    updateResult(index, resultText, response.data);
                })
                .catch(error => {
                    console.error(`Error fetching the URL: ${url}`, error);
                    updateResult(index, `Error: ${error.message}`, error.response ? error.response.data : 'No Response Data');
                });
        }

        function updateResult(index, result, response) {
            const records = JSON.parse(localStorage.getItem(recordsKey)) || [];
            records[index].result = result;
            records[index].response = response;
            records[index].timestamp = new Date().toISOString(); // ISO 8601 format for UTC timestamp
            localStorage.setItem(recordsKey, JSON.stringify(records));

            document.getElementById(`result-${index}`).textContent = result;
            document.getElementById(`timestamp-${index}`).textContent = records[index].timestamp;
        }

        function updateRecord(index, field, value) {
            const records = JSON.parse(localStorage.getItem(recordsKey)) || [];
            records[index][field] = value;
            localStorage.setItem(recordsKey, JSON.stringify(records));
        }

        function removeRecord(index) {
            let records = JSON.parse(localStorage.getItem(recordsKey)) || [];
            records.splice(index, 1);
            localStorage.setItem(recordsKey, JSON.stringify(records));
            document.location.reload();
        }

        function toggleDebugPanel(index, close = false) {
            const debugPanel = document.getElementById('debug-panel');
            const debugContent = document.getElementById('debug-content');
            const overlay = document.getElementById('overlay');
            const records = JSON.parse(localStorage.getItem(recordsKey)) || [];

            if (close || index === null) {
                debugPanel.style.display = 'none';
                overlay.style.display = 'none';
                debugContent.innerHTML = '';
                return;
            }

            const responseText = records[index].response || 'No Debug Data';
            debugPanel.style.display = 'block';
            overlay.style.display = 'block';
            debugContent.innerHTML = escapeHtml(responseText);
        }

        function escapeHtml(text) {
            const map = {
                '&': '&amp;',
                '<': '&lt;',
                '>': '&gt;',
                '"': '&quot;',
                "'": '&#039;'
            };
            return text.replace(/[&<>"']/g, function(m) { return map[m]; });
        }
    </script>
</body>

</html>

update it such that the auto fetching for all row is controlled by a switch just above the table on the right hand side, the status of the auto fetching is store in cookie as well, default is false