mirror of
https://github.com/michivonah/click-guide.git
synced 2025-12-22 22:16:28 +01:00
revert to scratch & create basic chrome extension
This commit is contained in:
parent
cfb4959168
commit
3363ec9acf
5 changed files with 40 additions and 98 deletions
|
|
@ -1,10 +1,7 @@
|
|||
let isRecording = false;
|
||||
// Script for Popup
|
||||
const toggleRecordingBtn = document.getElementById("toggleRecording");
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.getElementById("toggle-recording").addEventListener("click", () => {
|
||||
isRecording = !isRecording;
|
||||
const message = isRecording ? "start" : "stop";
|
||||
chrome.runtime.sendMessage({ action: message });
|
||||
document.getElementById("toggle-recording").textContent = isRecording ? "Stop Recording" : "Start Recording";
|
||||
});
|
||||
});
|
||||
toggleRecordingBtn.addEventListener('click', () => {
|
||||
console.log("Button clicked");
|
||||
chrome.runtime.sendMessage({action: 'triggerName'});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue