Skip to content

Commit 2284827

Browse files
committed
changing the website to get the copy link as raw jsono
1 parent 165059a commit 2284827

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

install.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ echo " Installing Codekub "
88
echo "============================="
99
echo "This script will run boot.sh from GitHub..."
1010

11-
# Use sudo if available
1211
if command -v sudo >/dev/null 2>&1; then
13-
bash <(curl -fsSL "$BOOT_URL") # run boot.sh in a process substitution
12+
eval "$(curl -fsSL "$BOOT_URL")"
1413
else
15-
bash <(curl -fsSL "$BOOT_URL")
14+
eval "$(curl -fsSL "$BOOT_URL")"
1615
fi

src/app/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
"use client"; // needed for React hooks in Next.js app router
1+
"use client";
2+
23
import { useState } from "react";
34

45
export default function Home() {
@@ -9,7 +10,7 @@ export default function Home() {
910
const handleCopy = () => {
1011
navigator.clipboard.writeText(installCommand);
1112
setCopied(true);
12-
setTimeout(() => setCopied(false), 2000); // reset after 2 seconds
13+
setTimeout(() => setCopied(false), 2000);
1314
};
1415

1516
return (
@@ -19,7 +20,6 @@ export default function Home() {
1920
<h1 className="text-5xl font-bold tracking-tight text-green-400">
2021
CODEKUB
2122
</h1>
22-
2323
<p className="mt-4 text-lg text-slate-400">
2424
A CSE-focused developer setup for Ubuntu 24.04+
2525
<br />

src/components/worker.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// worker.js
2+
addEventListener("fetch", event => {
3+
event.respondWith(
4+
fetch("https://raw.githubusercontent.com/CodeCompasss/codekub/main/boot.sh")
5+
.then(res => res.text())
6+
.then(script => new Response(script, {
7+
headers: { "Content-Type": "text/plain;charset=UTF-8" }
8+
}))
9+
)
10+
})

0 commit comments

Comments
 (0)