     } finally {
        if (loop) {
          setTimeout(getLogs, 5 * 1000, true);
        }
      }
      const $logs = document.getElementById("logs");
      // 判断滚动条是否在底部
      const isBottom = $logs.scrollHeight - $logs.scrollTop - $logs.clientHeight < 10;
      $logs.value = logsList.join("");
      // 如果滚动条原先在底部，滚动到底部
      if (isBottom) {
        $logs.scrollTop = $logs.scrollHeight;
      }
      const oldLogItem = localStorage.getItem("logItem") 