From 7a621d6e25ccbf6797eea8397f52bd8092666a97 Mon Sep 17 00:00:00 2001 From: simonzhangs <2863389578@qq.com> Date: Wed, 9 Feb 2022 17:45:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=95=AA=E8=8C=84=E9=92=9F?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E7=95=8C=E9=9D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/html/pomodoro/assets/js/popup.js | 27 +------------------ .../assets/html/pomodoro/background.js | 2 +- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/packages/shell-chrome/assets/html/pomodoro/assets/js/popup.js b/packages/shell-chrome/assets/html/pomodoro/assets/js/popup.js index 122fa0a..8d58bfd 100644 --- a/packages/shell-chrome/assets/html/pomodoro/assets/js/popup.js +++ b/packages/shell-chrome/assets/html/pomodoro/assets/js/popup.js @@ -1,29 +1,4 @@ -// const btn = document.querySelector("#switch"); - -// chrome.storage.sync.get("linkOpen", ({ linkOpen }) => { -// btn.checked = linkOpen; -// }); - -// btn.addEventListener("change", () => { -// if (btn.checked) { -// chrome.storage.sync.set({ linkOpen: true }); -// } else { -// chrome.storage.sync.set({ linkOpen: false }); -// } -// // 获取当前tab窗口 -// chrome.tabs.query({ active: true, currentWindow: true }, function (tabs) { -// chrome.scripting.executeScript({ -// target: { tabId: tabs[0].id }, -// func: refreshPage, -// }); -// }); -// }); - -// // 刷新页面 -// function refreshPage() { -// window.location.reload(); -// } - +//元素获取 const startBtn = document.getElementById("start-btn"); const resetBtn = document.getElementById("reset-btn"); const endBtn = document.getElementById("end-btn"); diff --git a/packages/shell-chrome/assets/html/pomodoro/background.js b/packages/shell-chrome/assets/html/pomodoro/background.js index b73afc7..a3cbb73 100644 --- a/packages/shell-chrome/assets/html/pomodoro/background.js +++ b/packages/shell-chrome/assets/html/pomodoro/background.js @@ -59,7 +59,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { minutes: 24, seconds: 60, countdownTimer: "25:00", - status: "start", + status:"init" }, }); } else {