We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9fdd31 commit 3b2fb60Copy full SHA for 3b2fb60
1 file changed
globals/static/index.html
@@ -180,7 +180,11 @@ <h1>RSS Reader</h1>
180
}
181
socket.onclose = event => {
182
console.log("WebSocket closed. Reconnecting...");
183
- setInterval(reloadHtml, 3000);
+ // 使用媒体查询判断设备类型
184
+ const isMobile = window.matchMedia('(max-width: 767px)').matches;
185
+ if (!isMobile) {
186
+ setInterval(reloadHtml, 3000);
187
+ }
188
};
189
// Send heartbeat message every 120 seconds
190
const sendHeartbeat = () => {
0 commit comments