const { dialog } = require("electron"); const { autoUpdater } = require("electron-updater"); const { Logger } = require("lib/logger.js"); const { _ } = require("lib/locale.js"); let autoUpdateLogger_ = new Logger(); let checkInBackground_ = false; let isCheckingForUpdate_ = false; let parentWindow_ = null; // Note: Electron Builder's autoUpdater is incredibly buggy so currently it's only used // to detect if a new version is present. If it is, the download link is simply opened // in a new browser window. autoUpdater.autoDownload = false; function htmlToText_(html) { let output = html.replace(/\n/g, ""); output = output.replace(/
  • /g, "- "); output = output.replace(/

    /g, ""); output = output.replace(/<\/p>/g, "\n"); output = output.replace(/<\/li>/g, "\n"); output = output.replace(/