mirror of
https://github.com/Manoj-HV30/PhonoCoach.git
synced 2026-05-16 19:35:26 +00:00
9 lines
234 B
JavaScript
9 lines
234 B
JavaScript
let selectedText = "";
|
|
document.addEventListener("mouseup", () => {
|
|
const selection = window.getSelection().toString().trim();
|
|
if (selection) {
|
|
selectedText = selection;
|
|
chrome.storage.local.set({ selectedText });
|
|
}
|
|
});
|