From b1537a4f7cdf279f0ceed557c728899243b46fea Mon Sep 17 00:00:00 2001 From: Felix Lu Date: Thu, 21 Nov 2024 16:11:11 +0800 Subject: [PATCH] chore: bump version to 0.2.0 - Fixed issue with duplicate copy transcript buttons - Added check to prevent multiple button creation --- package.json | 2 +- src/content/index.tsx | 7 +++++++ src/manifest.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0d81a8fd..693a368a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coursera-copilot", - "version": "0.1.0", + "version": "0.2.0", "description": "Chrome extension to enhance Coursera learning experience", "main": "index.js", "type": "module", diff --git a/src/content/index.tsx b/src/content/index.tsx index 88a53b6a..16e9ad89 100644 --- a/src/content/index.tsx +++ b/src/content/index.tsx @@ -41,6 +41,13 @@ const App = () => { const init = async () => { console.log('[Coursera Copilot] Initializing extension...'); + // Check if button already exists + const existingContainer = document.getElementById('coursera-copilot-container'); + if (existingContainer) { + console.log('[Coursera Copilot] Button already exists, skipping initialization'); + return; + } + const tablist = await findElement(TABLIST_SELECTORS); if (tablist) { diff --git a/src/manifest.json b/src/manifest.json index 1fc5a492..a347516b 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "Coursera Copilot", - "version": "0.1.0", + "version": "0.2.0", "description": "Enhance your Coursera learning experience with useful tools", "permissions": ["clipboardWrite", "activeTab"], "host_permissions": ["https://*.coursera.org/*"],