Skip to content

Commit cc987e0

Browse files
committed
Macos fixes
1 parent 1dbbff6 commit cc987e0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<div style="display: flex;">
4444
<a class="blueBtn" id="openHomebrew" target="_blank" href="https://formulae.brew.sh/formula/yt-dlp"
4545
data-translate="openHomebrew">Open Homebrew</a>
46-
<button class="advancedToggle" onclick="quitApp()" data-translate="close">Close</button>
46+
<button class="advancedToggle" id="quitAppBtn" data-translate="close">Close</button>
4747
</div>
4848
</div>
4949
</div>

src/renderer.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const CONSTANTS = {
2525
TITLE_INPUT: "titleName",
2626
URL_INPUTS: ".url",
2727
AUDIO_PRESENT_SECTION: "audioPresent",
28+
QUIT_APP_BTN: "quitAppBtn",
2829
// Format Selectors
2930
VIDEO_FORMAT_SELECT: "videoFormatSelect",
3031
AUDIO_FORMAT_SELECT: "audioFormatSelect",
@@ -310,6 +311,8 @@ class YtDownloaderApp {
310311
}
311312

312313
$(CONSTANTS.DOM_IDS.POPUP_BOX_MAC).style.display = "block";
314+
315+
return ""
313316
} else if (platform() === "freebsd") {
314317
try {
315318
const foundPath = execSync("which yt-dlp").toString().trim();
@@ -652,6 +655,10 @@ class YtDownloaderApp {
652655
this._showPopup(i18n.__("copiedText"), false);
653656
});
654657

658+
$(CONSTANTS.DOM_IDS.QUIT_APP_BTN).addEventListener("click", () => {
659+
ipcRenderer.send("quit", "quit");
660+
});
661+
655662
// IPC listeners
656663
ipcRenderer.on("link", (event, text) => this.getInfo(text));
657664
ipcRenderer.on("downloadPath", (event, downloadPath) => {

0 commit comments

Comments
 (0)