I made chrome extension called spaced repetition,  will you review it for me and tell me what are drawbacks and improvements should I make it good project to stand out in resume for faang or big MNCs interview,
popup.js
document.addEventListener('DOMContentLoaded', function() {
    const createTaskButton = document.getElementById('createTaskButton');
    const todayTasks = document.getElementById('todayTasks');
    const upcomingTasks = document.getElementById('upcomingTasks');
    const viewAllButton = document.getElementById('viewAllButton');

    function createTaskItem(task, isToday) {
        const taskItem = document.createElement('div');
        taskItem.classList.add('task-item'); // Add a CSS class to the task item

        const buttonGroup = document.createElement('div'); // Container for the buttons
        buttonGroup.classList.add('button-group'); // Add a CSS class to the container

        const doneButton = document.createElement('button');
        doneButton.innerHTML = '&#10003;'; // ✓ symbol
        doneButton.classList.add('action-button', 'done'); // Add CSS classes to the button

        const removeButton = document.createElement('button');
        removeButton.innerHTML = 'X';
        removeButton.classList.add('action-button', 'remove'); // Add CSS classes to the button

        const taskTitle = document.createElement('span');
        taskTitle.textContent = task.title;

        buttonGroup.appendChild(doneButton);
        buttonGroup.appendChild(removeButton);

        taskItem.appendChild(buttonGroup);
        taskItem.appendChild(taskTitle);

        if (isToday) {
            const createdDate = document.createElement('span');
            const createdDateString = new Date(task.date).toLocaleDateString();
            createdDate.textContent = ` (${createdDateString})`;
            taskItem.appendChild(createdDate);

            if (task.isCompleted) {
                const daysEntered = document.createElement('span');
                daysEntered.textContent = ` Last: ${task.daysEntered}`;
                taskItem.appendChild(daysEntered);
            }
        } else {
            const nextRevision = document.createElement('span');
            nextRevision.textContent = ` (Next: ${task.nextRevision} Count: ${task.tasksCount})`;
            taskItem.appendChild(nextRevision);
        }

        doneButton.addEventListener('click', function() {
            const days = prompt('Enter the number of days for revision:');
            if (days) {
                const revisionDate = new Date();
                revisionDate.setDate(revisionDate.getDate() + parseInt(days));

                const completedTask = {
                    id: task.id,
                    title: task.title,
                    isCompleted: true,
                    date: revisionDate.toLocaleDateString(), // Use revised date
                    lastRevised: new Date().toLocaleDateString(),
                    nextRevision: revisionDate.toLocaleDateString(),
                    daysEntered: days,
                    tasksCount: task.tasksCount + 1,
                    taskDatetime: getCurrentTime()
                };

                const todayTasksList = getTasksFromStorage('tasks');
                const upcomingTasksList = getTasksFromStorage('upcomingTasks');

                if (isToday) {
                    const index = todayTasksList.findIndex(item => item.id === task.id);
                    if (index > -1) {
                        todayTasksList.splice(index, 1);
                        upcomingTasksList.push(completedTask);
                        saveTasksToStorage('tasks', todayTasksList);
                        saveTasksToStorage('upcomingTasks', upcomingTasksList);
                    }
                } else {
                    const index = upcomingTasksList.findIndex(item => item.id === task.id);
                    if (index > -1) {
                        upcomingTasksList.splice(index, 1);
                        upcomingTasksList.push(completedTask);
                        saveTasksToStorage('upcomingTasks', upcomingTasksList);
                    }
                }
            }
            refreshTasks();
        });

        removeButton.addEventListener('click', function() {
            const todayTasksList = getTasksFromStorage('tasks');
            const upcomingTasksList = getTasksFromStorage('upcomingTasks');
            const todayIndex = todayTasksList.findIndex(item => item.id === task.id);
            const upcomingIndex = upcomingTasksList.findIndex(item => item.id === task.id);

            if (isToday) {
                if (todayIndex > -1) {
                    todayTasksList.splice(todayIndex, 1);
                    saveTasksToStorage('tasks', todayTasksList);
                    refreshTasks();
                }
            } else {
                if (upcomingIndex > -1) {
                    upcomingTasksList.splice(upcomingIndex, 1);
                    saveTasksToStorage('upcomingTasks', upcomingTasksList);
                    refreshTasks();
                }
            }
        });

        return taskItem;
    }
    function getCurrentTime() {
        const currentTime = new Date().toLocaleTimeString();
        return currentTime;
      }

    function showTasks(tasks, container, isToday) {
        container.innerHTML = '';
        tasks.forEach(function(task) {
            const taskItem = createTaskItem(task, isToday);
            container.appendChild(taskItem);
        });
    }

    function saveTasksToStorage(key, tasks) {
        localStorage.setItem(key, JSON.stringify(tasks));
    }

    function getTasksFromStorage(key) {
        return JSON.parse(localStorage.getItem(key)) || [];
    }

    function refreshTasks() {
        moveUpcomingTasksToToday();
        const todayTasksList = getTasksFromStorage('tasks');
        const upcomingTasksList = getTasksFromStorage('upcomingTasks');

        showTasks(todayTasksList, todayTasks, true);
        showTasks(upcomingTasksList, upcomingTasks, false);
    }

    setInterval(moveUpcomingTasksToToday, 15 * 1000);
    function moveUpcomingTasksToToday() {
        const upcomingTasksList = getTasksFromStorage('upcomingTasks');
        const todayTasksList = getTasksFromStorage('tasks');

        const currentDate = new Date().toLocaleDateString();

        const tasksToMove = upcomingTasksList.filter(task => {
            const taskDate = new Date(task.date).toLocaleDateString();
            return taskDate === currentDate || new Date(taskDate) < new Date(currentDate);
        });

        if (tasksToMove.length > 0) {
            todayTasksList.push(...tasksToMove);
            saveTasksToStorage('tasks', todayTasksList);

            tasksToMove.forEach(task => {
                const index = upcomingTasksList.findIndex(item => item.id === task.id);
                if (index > -1) {
                    upcomingTasksList.splice(index, 1);
                }
            });

            saveTasksToStorage('upcomingTasks', upcomingTasksList);
        }
    }
    function exportTasks() {
        const allTasks = {
          todayTasks: getTasksFromStorage('tasks'),
          upcomingTasks: getTasksFromStorage('upcomingTasks')
        };
    
        const jsonTasks = JSON.stringify(allTasks);
        const dataURI = 'data:text/json;charset=utf-8,' + encodeURIComponent(jsonTasks);
    
        const downloadLink = document.createElement('a');
        downloadLink.setAttribute('href', dataURI);
        downloadLink.setAttribute('download', 'tasks.json');
        downloadLink.click();
      }
    
      // Import tasks from JSON
function importTasks(file) {
    const reader = new FileReader();
    reader.onload = function(event) {
      const importedTasks = JSON.parse(event.target.result);
  
      if (importedTasks.todayTasks && importedTasks.upcomingTasks) {
        const existingTodayTasks = getTasksFromStorage('tasks');
        const existingUpcomingTasks = getTasksFromStorage('upcomingTasks');
  
        const updatedTodayTasks = existingTodayTasks.concat(importedTasks.todayTasks);
        const updatedUpcomingTasks = existingUpcomingTasks.concat(importedTasks.upcomingTasks);
        updatedTodayTasks.forEach(task => {
            task.tasksCount = task.tasksCount || 0;
          });
          updatedUpcomingTasks.forEach(task => {
            task.tasksCount = task.tasksCount || 0;
          });
        saveTasksToStorage('tasks', updatedTodayTasks);
        saveTasksToStorage('upcomingTasks', updatedUpcomingTasks);
        refreshTasks();
      } else {
        alert('Invalid file format. Please select a valid tasks.json file.');
      }
    };
  
    reader.readAsText(file);
  }
  
    
      // Export tasks button event listener
      const exportButton = document.getElementById('exportButton');
      exportButton.addEventListener('click', exportTasks);
    
      // Import tasks input event listener
      const importInput = document.getElementById('importInput');
      importInput.addEventListener('change', function(event) {
        const file = event.target.files[0];
        importTasks(file);
      });
    createTaskButton.addEventListener('click', function() {
        chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) {
            const activeTab = tabs[0];
            const title = activeTab.title;
            const task = {
                id: generateUniqueId(),
                title: title,
                isCompleted: false,
                date: new Date().toLocaleDateString(),
                lastRevised: '',
                nextRevision: '',
                days: '',
                tasksCount: 0,
                taskDatetime: getCurrentTime()
            };
            const existingTasks = getTasksFromStorage('tasks');

            existingTasks.push(task);
            saveTasksToStorage('tasks', existingTasks);
            refreshTasks();
        });
    });

    viewAllButton.addEventListener('click', function() {
        const allTasks = getTasksFromStorage('tasks');
        const upcomingTasks = getTasksFromStorage('upcomingTasks');

        const allTasksHTML = allTasks
            .map(task => `<li><a href="${task.link}">${task.title}</a></li>`)
            .join('');
        const upcomingTasksHTML = upcomingTasks
            .map(task => `<li><a href="${task.link}">${task.title}</a> - Next Revision: ${task.nextRevision}, Days: ${task.daysEntered}</li>`)
            .join('');
        
        const html = `
            <html>
            <head>
                <title>All Tasks</title>
            </head>
            <body>
                <h1>All Tasks</h1>
                <h2>Tasks</h2>
                <ul>${allTasksHTML}</ul>
                <h2>Upcoming Tasks</h2>
                <ul>${upcomingTasksHTML}</ul>
            </body>
            </html>
        `;
        chrome.tabs.create({
            url: 'data:text/html;charset=utf-8,' + encodeURIComponent(html)
        });
    });

    refreshTasks();
});

function generateUniqueId() {
    return Math.random().toString(36).substr(2, 9);
}