diff --git a/chatgpt-suno-tampermonkey.user.js b/chatgpt-suno-tampermonkey.user.js index babb8ba..6646410 100644 --- a/chatgpt-suno-tampermonkey.user.js +++ b/chatgpt-suno-tampermonkey.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name ChatGPT to Suno Prompt Copier // @namespace local.suno-helper -// @version 0.1.2 +// @version 0.1.3 // @description Copy structured ChatGPT song prompt versions into Suno fields. // @author local // @match https://chatgpt.com/* @@ -57,6 +57,23 @@ #cgs-panel.cgs-error { border-color: rgba(255, 84, 84, 0.7); } + #cgs-launcher { + position: fixed; + right: 18px; + top: 18px; + z-index: 2147483647; + min-width: 76px; + min-height: 34px; + padding: 7px 10px; + color: #ffffff; + background: #ef4444; + border: 2px solid #ffffff; + border-radius: 999px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); + cursor: pointer; + font: 700 13px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; + } + #cgs-launcher:hover { background: #dc2626; } #cgs-panel * { box-sizing: border-box; } #cgs-panel.cgs-minimized .cgs-body { display: none; } .cgs-head { @@ -133,6 +150,18 @@ return panel.querySelector(".cgs-body"); } + function ensureLauncher(label, onClick) { + let launcher = document.querySelector("#cgs-launcher"); + if (!launcher) { + launcher = document.createElement("button"); + launcher.id = "cgs-launcher"; + launcher.type = "button"; + document.body.appendChild(launcher); + } + launcher.textContent = label; + launcher.onclick = onClick; + } + function createErrorPanel(error) { if (!document.body) return; const body = createPanel("Suno Helper Error", "cgs-error"); @@ -248,6 +277,7 @@ function bootChatGPT() { clearInterval(chatRenderTimer); + ensureLauncher("Suno", () => bootChatGPT()); const body = createPanel("ChatGPT -> Suno", "cgs-chatgpt"); body.innerHTML = `
현재 답변에서 Version A/B/C를 찾아서 저장해.
@@ -406,6 +436,7 @@ } async function bootSuno() { + ensureLauncher("Suno", () => bootSuno()); const body = createPanel("Suno Prompt Paste"); const payload = await readPayload(); body.innerHTML = `