From 5d9caffcb26f87e0cef288ab43e1e5d417f04a0c Mon Sep 17 00:00:00 2001 From: Janmejay Shibaprasad Mahanta <242730255+janmejay1438@users.noreply.github.com> Date: Tue, 19 May 2026 18:45:25 +0530 Subject: [PATCH] Added event listener for id=extract-btn and enhanced the contributing.md file --- CONTRIBUTING.md | 11 +++++++++++ js/app.js | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d48f29b..1026e59 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,6 +43,17 @@ Welcome to GSSoC! Here's how the contribution flow works for this project: ```bash git checkout -b your-feature-name ``` +5. **Install Dependencies** + ```bash + npm install + ``` +6. Create a .env file and copy paste everything from .env.example and replace your api key there. + +7. **Run the backend** (Backend serves Frontend) + ```bash + npm start + ``` +8. Start [Local Host 3000](http://localhost:3000/) --- diff --git a/js/app.js b/js/app.js index 9bfd993..3bae0c8 100644 --- a/js/app.js +++ b/js/app.js @@ -65,6 +65,18 @@ const addItemsBtn = document.getElementById('add-btn'); const downloadBtn = document.getElementById('download-btn'); const newTaskBtn = document.getElementById('add-task-btn'); +// Event listener for extract-btn +pasteInput.addEventListener('keydown', (e) => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + + if (!pasteInput.value.trim()) return; + if (extractBtn.disabled) return; + + extractBtn.click(); + } +}); + const SUBJECT_COLORS = [