Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: temporarily remove Cookbook Onboard integration #186

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions theme/head.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,3 @@
amplitude.init('f60df2d0d709d50faa2ffda153a84bc0', { identityStorage:'none', defaultTracking: true });
}
</script>

<script>
function initAskCookbook() {
// It's a public API key, so it's safe to expose it here
const PUBLIC_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NzU4Y2YyODM4NTcxODU5MjU0MGIyMDciLCJpYXQiOjE3MzM4NzM0NDgsImV4cCI6MjA0OTQ0OTQ0OH0.Z3cv3HuMkYq3aYZYzCKkkYuM5LI3KG-kuA0R-GaSMV4";

let cookbookContainer = document.getElementById("__cookbook");
if (!cookbookContainer) {
cookbookContainer = document.createElement("div");
cookbookContainer.id = "__cookbook";
cookbookContainer.dataset.apiKey = PUBLIC_API_KEY;
document.body.appendChild(cookbookContainer);
}

let cookbookScript = document.getElementById("__cookbook-script");
if (!cookbookScript) {
cookbookScript = document.createElement("script");
cookbookScript.id = "__cookbook-script";
cookbookScript.src = "https://cdn.jsdelivr.net/npm/@cookbookdev/docsbot/dist/standalone/index.cjs.js";
cookbookScript.async = true;
document.head.appendChild(cookbookScript);
}
}

// Check if the document is already loaded and if so, initialize the script, otherwise wait for the load event
if (document.readyState === "complete") {
initAskCookbook();
} else {
window.addEventListener("load", initAskCookbook);
}
</script>
Loading