Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions website/site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
// The page opens as a sensible one; ?awake (or a frozen frame) goes straight to the picture. (Where the picture
// cannot be drawn live there is nothing to go straight to but the still, and only a frozen frame is given that.)
document.documentElement.dataset.trip = /[?&]freeze\b/.test(location.search) || (navigator.gpu && /[?&]awake\b/.test(location.search)) ? 'skip' : 'off'
// Which sensible one. A first visit gets NormalScript (?first or ?normal: always). Whoever has been through the
// trip and come down (the psychoscript_seen cookie), or cannot have the picture drawn live, or asks (?home or
// Which sensible one. A first visit gets NormalScript (?first or ?normal: always). Whoever has taken the tab
// before (the psychoscript_seen cookie), or cannot have the picture drawn live, or asks (?home or
// ?after), gets Psychoscript's own page.
document.documentElement.dataset.front = !navigator.gpu
? 'home'
Expand Down
8 changes: 5 additions & 3 deletions website/site/liquid.js
Original file line number Diff line number Diff line change
Expand Up @@ -12058,6 +12058,9 @@ function motionControl() {
if (!tab || sober === !awake || (awake && (grounded || !armed))) return
sober = !awake
taken = true
// Whoever has taken the tab is remembered at once (a cookie, for a year), so that coming again, or only
// reloading to get out, finds Psychoscript's own page and not the tab to be taken again.
if (awake) document.cookie = 'psychoscript_seen=1; max-age=31536000; path=/; SameSite=Lax'
const anchor = originFor(origin)
const at = anchor.getBoundingClientRect()
root.style.setProperty('--trip-x', `${at.left + at.width / 2}px`)
Expand Down Expand Up @@ -12093,7 +12096,6 @@ function motionControl() {
}
const comeDown = () => {
if (sober) return
document.cookie = 'psychoscript_seen=1; max-age=31536000; path=/; SameSite=Lax'
motion.setFront('home')
corp?.scrollTo?.({ top: 0, behavior: 'instant' })
if (!grounded && !reduced.matches) root.classList.add('lensing')
Expand Down Expand Up @@ -13671,8 +13673,8 @@ async function start() {
}
// What comes up along the bottom is pressed for itself: the picture takes no notice.
for (const bar of [dock, comedown]) bar?.addEventListener('pointerdown', (event) => event.stopPropagation())
// "I'm ready to come down": the visitor has been through it, and is remembered to have been (a cookie, for a
// year); the tour stops and the sound goes; and the picture closes over, not with NormalScript's page this time
// "I'm ready to come down": the visitor has been through it (and was remembered to have been when the tab was
// taken); the tour stops and the sound goes; and the picture closes over, not with NormalScript's page this time
// but with Psychoscript's own, which is what they will find here from now on.
if (comedown) {
comedown.hidden = false
Expand Down