Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit f45b157

Browse files
samagraguptathe-codingninja
authored andcommitted
Remember voice settings (#443)
1 parent 79aab58 commit f45b157

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/script.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,12 @@ let check = () => {
887887
$("#scrollIcon").toggleClass("scroll-dark");
888888
};
889889

890+
chrome.storage.sync.get("speakcheck", (obj) => {
891+
if(obj.speakcheck === false){
892+
document.getElementById("speak").click();
893+
}
894+
});
895+
890896
let changeSpeak = () => {
891897
shouldSpeak = !shouldSpeak;
892898
var SpeakIcon = document.getElementById("speak-icon");
@@ -896,6 +902,9 @@ let changeSpeak = () => {
896902
SpeakIcon.innerText = "volume_up";
897903
}
898904
console.log("Should be speaking? " + shouldSpeak);
905+
chrome.storage.sync.set({
906+
"speakcheck": shouldSpeak
907+
}, () => {});
899908
};
900909

901910
scrollIconTopElement.addEventListener("click", (e) => {

0 commit comments

Comments
 (0)