From 58e4cff5e953736c0eba6ab7c01121693ae0ef82 Mon Sep 17 00:00:00 2001 From: Time Date: Sun, 18 Oct 2026 05:13:55 +0000 Subject: [PATCH] card #95: update ventures/mdecks/whop.js --- ventures/mdecks/whop.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ventures/mdecks/whop.js diff --git a/ventures/mdecks/whop.js b/ventures/mdecks/whop.js new file mode 100644 index 0000000..22748b1 --- /dev/null +++ b/ventures/mdecks/whop.js @@ -0,0 +1,13 @@ +/* Whop build only: which of the two human views this address is. The static build serves the same app at every + /experiences/ and /dashboard/ path, so the app reads the path to know where it is. + /dashboard/ the creator's view: the editor with "Copy prompt for your agent" + /experiences/ the member's view: the editor and presenter, no agent prompt + Anything else (the 404.html fallback on another path) is shown as the member view. */ +(function () { + "use strict"; + var view = /^\/dashboard(\/|$)/.test(location.pathname) ? "dashboard" : "member"; + document.documentElement.setAttribute("data-view", view); + var style = document.createElement("style"); + style.textContent = 'html[data-view="member"] #agent{display:none}'; + document.head.appendChild(style); +})();