export default class Electron { static fixBlankLink(link: { target: string | null; href: string; addEventListener: (type: string, callback: (e?: Event) => void) => void; }) { const electronStr = "electron"; const electron = typeof require == "undefined" || typeof process != "object" ? null : require(electronStr); if (typeof electron && link.target == "_blank") { link.addEventListener("click", () => { electron?.shell.openExternal(link.href); }); } } }