Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
R
Rūdolfs Ošiņš
Move public deployment from app.radicle.xyz to radicle.network 28 days ago 7e725f3bdfd84f2c84197f86f148dcfbd30851db History
radicle-explorer scripts inject-plausible
#!/usr/bin/env node

import fs from "fs";

const file = "build/index.html";
const snippet = `<script defer="" data-domain="radicle.network" src="https://plausible.io/js/script.js"></script>`;

const html = fs.readFileSync(file, "utf8");

if (html.includes(snippet)) {
  console.log("ℹ️ Script already present, skipping");
  process.exit(0);
}

if (!html.includes("</head>")) {
  console.error("❌ </head> not found in index.html");
  process.exit(1);
}

const updated = html.replace("</head>", `  ${snippet}\n  </head>`);

fs.writeFileSync(file, updated);
console.log("✅ Plausible script injected");