Skip to content

Commit

Permalink
some little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
owengregson committed Aug 29, 2024
1 parent 28bc61c commit 44e06b9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
10 changes: 3 additions & 7 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ document.addEventListener("DOMContentLoaded", function () {

saveButton.addEventListener("click", function () {
const textToSave = textInput.value;
chrome.storage.local.set({ savedText: textToSave }).then(() => {
console.log("Text saved:", textToSave);
});
chrome.storage.local.set({ savedText: textToSave });
});

resetButton.addEventListener("click", function () {
textInput.value = ""; // Clear the input field
chrome.storage.local.remove("savedText").then(() => {
console.log("Saved text removed");
});
textInput.value = "";
chrome.storage.local.remove("savedText");
});

startButton.addEventListener("click", function () {
Expand Down
4 changes: 1 addition & 3 deletions js/service-worker.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
try {
importScripts("version-check.js");
} catch (e) {
console.error(e);
}
} catch (e) {}

const qwertyLayout = {
q: [0, 0],
Expand Down
3 changes: 0 additions & 3 deletions js/version-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ async function versionCheck() {
return true; // New version is available
}
} catch (error) {
console.log(error);
return true; // Assume there's an update to prevent potential issues
}
return false; // No new version available
Expand All @@ -34,7 +33,6 @@ function fetchLocalVersion() {
return fetch(LOCAL_VERSION_URL)
.then((response) => response.json())
.catch((error) => {
console.log("Failed to load local version:", error);
return null;
});
}
Expand All @@ -43,7 +41,6 @@ function fetchRemoteVersion() {
return fetch(REMOTE_VERSION_URL, { cache: "no-store" })
.then((response) => response.json())
.catch((error) => {
console.log("Failed to load remote version:", error);
return null;
});
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "tranquill",
"description": "Real-time automated typing bot for Google Chrome.",
"version": "1.0.6",
"version": "1.0.7",
"icons": {
"16": "./assets/images/icon_16x.png",
"48": "./assets/images/icon_48x.png",
Expand Down

0 comments on commit 44e06b9

Please sign in to comment.