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); +})();