From a58a14428a2598efdd7f1396d526973225026dca Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 13:50:09 -1000 Subject: [PATCH 1/9] Create --- submissions/Listening to this/icons/preview | 1 + 1 file changed, 1 insertion(+) create mode 100644 submissions/Listening to this/icons/preview diff --git a/submissions/Listening to this/icons/preview b/submissions/Listening to this/icons/preview new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/submissions/Listening to this/icons/preview @@ -0,0 +1 @@ + From 8615d4b76fa2e76ca6e36be268d1e78fc2932092 Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:02:55 -1000 Subject: [PATCH 2/9] Add files via upload --- submissions/Listening to this/icons/icon128.png | Bin 0 -> 2703 bytes submissions/Listening to this/icons/icon16.png | Bin 0 -> 272 bytes submissions/Listening to this/icons/icon48.png | Bin 0 -> 709 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 submissions/Listening to this/icons/icon128.png create mode 100644 submissions/Listening to this/icons/icon16.png create mode 100644 submissions/Listening to this/icons/icon48.png diff --git a/submissions/Listening to this/icons/icon128.png b/submissions/Listening to this/icons/icon128.png new file mode 100644 index 0000000000000000000000000000000000000000..5b8f52e4530da7ff1650a1d86d912f4ba6ed97d9 GIT binary patch literal 2703 zcmcImdpOf=AOCGOY&q_63~kn&qH@?1MYD}%H0K`l^duyTZv)D3OQ_%L(Cx_#MnE}^J-HGNy8CBxaLU;8x=4Nj}zkBxqq?F#mP+W0VC`twXot{eYBL@xWX3N0>fG!MNO303+20u-2BC z0mBPMUJZYGfap)#LSM+>q&m;}fN@#Rqj!OwI^r(53qysq>xNxgeq?3ltDbfvKb%yG zvq51z;c`IWhY1tAkY=7r`{9|tsfm?ei9bkna34AllU%^6>JF1zwRF1J6Lz(vBVjT_ z-{v{*BwI;zP!s9+g))1};)+0h#4I>PAr$Z>JwGqaw$ie;p67NSV>gs zUUdWXp?}fo((WkR=-X-Ldd}aw=jZv*Nmfn&L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= z2^n$|dgFGui*hZzO_n2x)*E3SqSDhwLC*SX6MM~jL3wn@)0Co@X^}{{H8gN5^z^1v zTj+rka>H9%E$W5~Vm_DP7potyER5>qI%TR|gelh1WX;;7-XI_f2%gH&xlvv&tbbl_ z;0QA-(J|@3veuN8WMBL|(Hel+F|Zo1_5qY1VHRkCC<1D+bY4Dz88Y?ul)CtEf$$Cm zd8o{`3VJt8sn8~0k%4Bs0P|wAg5xhLB*b=9+qAFx1)GcDTL)ZaYANhHlTIE9bJ{BG zRTJ)30vc4qyU^=f*g3Nv6I@?4D)=sYc17-S#L`CoSi0i6 z^52v7X2VpuDGzM$v0k%`pry}q8xd@^h7FiLRHXv!cI*M*7u4AulQ))YWxw`tZc~WE zshX{+8LJ&#RQ=UEyyXcypt_$^A21g`L-Vli8y~Uh2|3ZrHL+-^K06^ZyK4e}mDJ6+ zQM9K7D5hbMMsL8}<0i9#MWqWUxgNUiac6w^Tk&iHAtQ Mp5$cvkm$qs7cmIYrvLx| literal 0 HcmV?d00001 diff --git a/submissions/Listening to this/icons/icon16.png b/submissions/Listening to this/icons/icon16.png new file mode 100644 index 0000000000000000000000000000000000000000..3d5803f51dbebcbc3540b319357405c9259f115e GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85m^SL71`s>Bm%{;8IT)#}EtuWQOJ=-doRThW|HS9^0JUw&Qb< z!pc*!|Nk$3-1YYV|LJ)@Z!=#zJ)vf$aHO&!+kt|c*Y^AJoLRZTY;qFA300mOCd~$h zYz+pE%o7~1>ILz1>`gf{p~{!3r}=#6gd7H=G>?6M5>%uP2vpylq4;u_iUfO{fa+a_ zuEi5yw76sjrFHDT;IfW!Y4m?TmX(Z8Pt=u6e_+foXRi7G?Bs-m1O^7l$$sM2wtgpp P4rcIl^>bP0l+XkKoTgPx#1ZP1_K>z@;j|==^1poj532;bRa{vGxhX4Q_hXIe}@nrx20$NE#K~!i%?V3$) z(?A%8r|}s;qFkd_V1wAOMnY}lrYETFwgI*30#tznNZf?j4Ipua{5Wyi9copvpeZ1h z84uq#9$6?E$C+53I?}w-BV{%7KJwV(pAdPPYh<%~MC_7_wY;&l!2veJBP< zbNH39{j=q8d^&am+Sxm!Z%C7^i6L{c-FsPsGFBsEmOYp)nnei$`vGGffWN(VOr2Kz zRt%ewdjHbeQ7HXCWe7}xGH^u3V(6*Z!<(hcBN_w{l<<6dEru7V_f89yM>Gi_t`D^0 z6EOuLwVeT#mQq2Z0CMn!v1Ep=@Kjnz72N`DzMNjc@(H_zmk**@K%CGcJb8awjnxxC z++gyDNXsn49S9&sASFZK#W%(d;fgVjgU`vDmKDsSbb&?U`SBx^kQL0M5&}*TKQ;n| zS$%;K2=q6|cJyE_PdoQS?=;mA;Jf(#E>C**Mej5f5in0=(t>#yfs_IQ zm425E`?EX8rXP@v=TxLO`k_7k;-A;CF=M#PxUMR3XZ1vycC6?3&V`<@O rN)T}U$!}OLk?YgfO(y%h4I%#k-}g^YV`;!i00000NkvXXu0mjfaCkO} literal 0 HcmV?d00001 From 711c6ae4d4633873d359ca97cb0832971b2fa278 Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:07:33 -1000 Subject: [PATCH 3/9] Add files via upload From 33f2a4c761cf6e82fb8f613b378a9cda852e9d03 Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:10:39 -1000 Subject: [PATCH 4/9] Create manifest.json --- submissions/Listening to this/manifest.json | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 submissions/Listening to this/manifest.json diff --git a/submissions/Listening to this/manifest.json b/submissions/Listening to this/manifest.json new file mode 100644 index 00000000..e814a312 --- /dev/null +++ b/submissions/Listening to this/manifest.json @@ -0,0 +1,23 @@ +{ + "manifest_version": 3, + "name": "Track Listened Items", + "version": "1.0", + "description": "Save URLs or titles of audio files, music, podcasts, or YouTube videos you've listened to.", + "permissions": ["storage", "tabs"], + "action": { + "default_popup": "popup.html", + "default_icon": { + "16": "icons/icon16.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } + }, + "background": { + "service_worker": "background.js" + }, + "icons": { + "16": "icons/icon16.png", + "48": "icons/icon48.png", + "128": "icons/icon128.png" + } +} From 60d0ae96810bc4d2072bf90b5fe808140c703591 Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:13:04 -1000 Subject: [PATCH 5/9] Delete submissions/Listening to this/icons/preview --- submissions/Listening to this/icons/preview | 1 - 1 file changed, 1 deletion(-) delete mode 100644 submissions/Listening to this/icons/preview diff --git a/submissions/Listening to this/icons/preview b/submissions/Listening to this/icons/preview deleted file mode 100644 index 8b137891..00000000 --- a/submissions/Listening to this/icons/preview +++ /dev/null @@ -1 +0,0 @@ - From c03f7633918a55b0880f0627e671426eaf81ef0d Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:14:38 -1000 Subject: [PATCH 6/9] Create popup.js --- submissions/Listening to this/popup.js | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 submissions/Listening to this/popup.js diff --git a/submissions/Listening to this/popup.js b/submissions/Listening to this/popup.js new file mode 100644 index 00000000..2e420704 --- /dev/null +++ b/submissions/Listening to this/popup.js @@ -0,0 +1,45 @@ +document.getElementById('mark-as-listened').addEventListener('click', () => { + chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => { + const tab = tabs[0]; + const category = document.getElementById('category').value; + const item = { title: tab.title, url: tab.url, timestamp: Date.now(), category: category }; + chrome.runtime.sendMessage({ action: 'addItem', item }, () => { + renderList(); + }); + }); +}); + +document.getElementById('search').addEventListener('input', (event) => { + renderList(); +}); + +document.getElementById('category').addEventListener('change', (event) => { + renderList(); +}); + +function renderList() { + const query = document.getElementById('search').value.toLowerCase(); + const category = document.getElementById('category').value; + chrome.runtime.sendMessage({ action: 'getListenedItems' }, (items) => { + const listElement = document.getElementById('listened-items'); + listElement.innerHTML = ''; + items.filter(item => + (item.title.toLowerCase().includes(query) || item.url.toLowerCase().includes(query)) && + (category === '' || item.category === category) + ).forEach((item, index) => { + const listItem = document.createElement('li'); + listItem.textContent = `${item.title} - ${item.url} (${item.category})`; + const deleteButton = document.createElement('button'); + deleteButton.textContent = 'Delete'; + deleteButton.addEventListener('click', () => { + chrome.runtime.sendMessage({ action: 'removeItem', index }, () => { + renderList(); + }); + }); + listItem.appendChild(deleteButton); + listElement.appendChild(listItem); + }); + }); +} + +renderList(); From ca1fccc3d47d808e558eb939f99cafa891f75e4e Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:24:18 -1000 Subject: [PATCH 7/9] Create popup.html --- submissions/Listening to this/popup.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 submissions/Listening to this/popup.html diff --git a/submissions/Listening to this/popup.html b/submissions/Listening to this/popup.html new file mode 100644 index 00000000..c5196814 --- /dev/null +++ b/submissions/Listening to this/popup.html @@ -0,0 +1,24 @@ + + + + Track Listened Items + + + +
+

Track Listened Items

+
+ + + +
+
    +
    + + + From 3dfe1eca74624dde0c94a619b666805dd4f35b6a Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:25:36 -1000 Subject: [PATCH 8/9] Create styles.css --- submissions/Listening to this/styles.css | 76 ++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 submissions/Listening to this/styles.css diff --git a/submissions/Listening to this/styles.css b/submissions/Listening to this/styles.css new file mode 100644 index 00000000..bb8f21f3 --- /dev/null +++ b/submissions/Listening to this/styles.css @@ -0,0 +1,76 @@ +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + padding: 10px; + width: 400px; + background-color: #f5f5f5; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + border-radius: 8px; +} + +h1 { + text-align: center; + color: #333; +} + +.controls { + display: flex; + justify-content: space-between; + margin-bottom: 10px; +} + +#mark-as-listened { + padding: 10px 20px; + background-color: #4CAF50; + color: white; + border: none; + cursor: pointer; + border-radius: 5px; + transition: background-color 0.3s; +} + +#mark-as-listened:hover { + background-color: #45a049; +} + +#search { + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + width: 45%; + transition: border-color 0.3s; +} + +#search:focus { + border-color: #4CAF50; + outline: none; +} + +ul { + list-style-type: none; + padding: 0; +} + +li { + background-color: #fff; + margin: 5px 0; + padding: 10px; + border-radius: 5px; + display: flex; + justify-content: space-between; + align-items: center; + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1); +} + +button { + padding: 5px 10px; + background-color: #f44336; + color: white; + border: none; + cursor: pointer; + border-radius: 5px; + transition: background-color 0.3s; +} + +button:hover { + background-color: #d32f2f; +} From 03b44b0a3c361866abcb7cf14f8cd3f29a659323 Mon Sep 17 00:00:00 2001 From: kasmeoandr Date: Mon, 21 Jul 2025 14:27:00 -1000 Subject: [PATCH 9/9] Create background.js --- submissions/Listening to this/background.js | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 submissions/Listening to this/background.js diff --git a/submissions/Listening to this/background.js b/submissions/Listening to this/background.js new file mode 100644 index 00000000..7bcdff79 --- /dev/null +++ b/submissions/Listening to this/background.js @@ -0,0 +1,36 @@ +chrome.runtime.onInstalled.addListener(() => { + chrome.storage.sync.set({ listenedItems: [] }); +}); + +function addItem(item) { + chrome.storage.sync.get(['listenedItems'], (result) => { + const items = result.listenedItems || []; + items.push(item); + chrome.storage.sync.set({ listenedItems: items }); + }); +} + +function removeItem(index) { + chrome.storage.sync.get(['listenedItems'], (result) => { + const items = result.listenedItems || []; + items.splice(index, 1); + chrome.storage.sync.set({ listenedItems: items }); + }); +} + +function getListenedItems(callback) { + chrome.storage.sync.get(['listenedItems'], (result) => { + callback(result.listenedItems || []); + }); +} + +chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { + if (request.action === 'addItem') { + addItem(request.item); + } else if (request.action === 'removeItem') { + removeItem(request.index); + } else if (request.action === 'getListenedItems') { + getListenedItems(sendResponse); + return true; // Keep the message channel open for sendResponse + } +});