Route WAV buttons through Suno UI download
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name ChatGPT to Suno Prompt Copier
|
||||
// @namespace local.suno-helper
|
||||
// @version 0.9.5
|
||||
// @version 0.9.8
|
||||
// @description Copy structured ChatGPT song prompt versions into Suno fields.
|
||||
// @author local
|
||||
// @match https://chatgpt.com/*
|
||||
@@ -30,7 +30,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const SCRIPT_VERSION = "0.9.7";
|
||||
const SCRIPT_VERSION = "0.9.8";
|
||||
const STORAGE_KEY = "chatgptSunoPromptSlots";
|
||||
const SLOT_COUNT = 2;
|
||||
const isChatGPT = location.hostname.includes("chatgpt.com") || location.hostname.includes("chat.openai.com");
|
||||
@@ -1815,15 +1815,15 @@
|
||||
<div class="cgs-track-list" data-cgs-track-list></div>
|
||||
<div class="cgs-row">
|
||||
<button class="cgs-btn cgs-wide" type="button" data-cgs-process-one-mp3>선택 1곡 MP3</button>
|
||||
<button class="cgs-btn cgs-wide" type="button" data-cgs-process-one-wav>선택 1곡 WAV</button>
|
||||
<button class="cgs-btn cgs-wide" type="button" data-cgs-process-one-wav>선택 1곡 WAV(UI)</button>
|
||||
</div>
|
||||
<div class="cgs-row">
|
||||
<button class="cgs-btn cgs-primary cgs-wide" type="button" data-cgs-process-selected-mp3>선택항목 MP3</button>
|
||||
<button class="cgs-btn cgs-primary cgs-wide" type="button" data-cgs-process-selected-wav>선택항목 WAV</button>
|
||||
<button class="cgs-btn cgs-primary cgs-wide" type="button" data-cgs-process-selected-wav>선택항목 WAV(UI)</button>
|
||||
</div>
|
||||
<div class="cgs-row">
|
||||
<button class="cgs-btn cgs-wide" type="button" data-cgs-ui-download-mp3>SUNO UI MP3 클릭</button>
|
||||
<button class="cgs-btn cgs-wide" type="button" data-cgs-ui-download-wav>SUNO UI WAV 클릭</button>
|
||||
<button class="cgs-btn cgs-wide" type="button" data-cgs-ui-download-wav>SUNO UI WAV 재시도</button>
|
||||
</div>
|
||||
<div class="cgs-row">
|
||||
<button class="cgs-btn cgs-wide" type="button" data-cgs-test-companion>연결 테스트</button>
|
||||
@@ -2039,7 +2039,7 @@
|
||||
});
|
||||
|
||||
body.querySelector("[data-cgs-process-one-wav]").addEventListener("click", async () => {
|
||||
await processSelectedTrack("wav");
|
||||
await clickSelectedSunoUiDownloads("wav", { one: true });
|
||||
});
|
||||
|
||||
body.querySelector("[data-cgs-process-selected-mp3]").addEventListener("click", async () => {
|
||||
@@ -2047,15 +2047,15 @@
|
||||
});
|
||||
|
||||
body.querySelector("[data-cgs-process-selected-wav]").addEventListener("click", async () => {
|
||||
await processSelectedTracks("wav");
|
||||
await clickSelectedSunoUiDownloads("wav");
|
||||
});
|
||||
|
||||
const clickSelectedSunoUiDownloads = async (format) => {
|
||||
const clickSelectedSunoUiDownloads = async (format, options = {}) => {
|
||||
if (!libraryTracks.length) {
|
||||
mergeLibraryTracks(scanSunoLibraryTracks());
|
||||
renderLibraryTrackList();
|
||||
}
|
||||
const tracks = getSelectedTracks();
|
||||
const tracks = options.one ? (getSelectedTracks().slice(0, 1)) : getSelectedTracks();
|
||||
if (!tracks.length) {
|
||||
setStatus(body, "선택된 곡이 없어. 목록에서 현재 화면에 보이는 곡을 먼저 선택해줘.");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user