From 4eab84e580878a8d40db0f394845e610d239065e Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Tue, 17 Sep 2024 00:43:56 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../notifications_api/using_the_notifications_api/index.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/zh-cn/web/api/notifications_api/using_the_notifications_api/index.md b/files/zh-cn/web/api/notifications_api/using_the_notifications_api/index.md index 4bf03fa04b1cd3..e76dbaf579a562 100644 --- a/files/zh-cn/web/api/notifications_api/using_the_notifications_api/index.md +++ b/files/zh-cn/web/api/notifications_api/using_the_notifications_api/index.md @@ -179,7 +179,7 @@ window.addEventListener("load", () => { button.addEventListener("click", () => { if (Notification?.permission === "granted") { demoLogs.innerText += `该网站有显示通知的权限。正在显示通知。\n`; - // 如果用户同意接收通知,让我们尝试发送十个通知 + // 如果用户同意接收通知,让我们尝试发送十个通知 let i = 0; // 使用时间间隔以避免某些浏览器(包括 Firefox)在特定时间内出现过多通知时会阻止通知 const interval = setInterval(() => { @@ -198,8 +198,7 @@ window.addEventListener("load", () => { Notification.requestPermission().then((status) => { // 如果用户同意 if (status === "granted") { - demoLogs.innerText += - "用户授予权限。正在发送通知。\n"; + demoLogs.innerText += "用户授予权限。正在发送通知。\n"; let i = 0; // 使用间隔以避免某些浏览器(包括 Firefox)在特定时间内出现过多通知时会阻止通知 const interval = setInterval(() => {