Skip to content

Commit 41dfc66

Browse files
committed
fix(share): share scripts using base64
1 parent c45f3bd commit 41dfc66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cli/share-script-to-scriptkit.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ let { filePath } = await selectScript(
77

88
const content = await readFile(filePath, "utf8")
99
await clipboard.writeText(content)
10+
11+
// Convert script content to base64 for URL parameter
12+
let script_b64 = Buffer.from(content).toString("base64")
13+
1014
await notify({
1115
title: "Script contents copied to clipboard",
1216
body: "Opening scriptkit.com/new to paste script"
1317
})
1418

15-
await open(`https://scriptkit.com/new`)
19+
await open(`https://scriptkit.com/new?script_b64=${script_b64}`)
1620

1721
export {}

0 commit comments

Comments
 (0)