-- Leo's gemini proxy

-- Connecting to gemini.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

amalgamation


previous


I figured the appropriate spot for a homespace was probably the same as the 2D homepage. So I started figuring out the best way to combine the two things into one page.

Janusweb is kind of intended to be embedded in normal 2d pages this way anyway, but I wanted to be able to selectively enable it.

First attempt was at putting a <janus-viewer> around the <FireBoxRoom> which might've worked, but I couldn't get the FireBoxRoom easily, because janusweb chokes if it has an id attribute attached to it.

and I couldn't getElementByName for it either for some reason.

Then I figured an easier way to do it would be to just insert the <script> include into the head on button click anyway.

Which also means one less thing for the page to load and not use when people are just looking at the 2D stuff.

The FireBoxRoom I have has some <Text> in it that will get displayed in the 2D page, so I set the style for FireBoxRoom to display: none;

and when janusweb.js loads up, it'll scroll the page to the top, and if you press space, it'll make you jump /and/ scroll the page down.

so I made the button also set body overflow: hidden along with hiding itself and now the 3D-ness uses the whole browser view-port without any weirdness.

Another thing that messed me up for a minute was that I've been serving my homepage as application/xml, and I guess document.getElementByTagName() is case-sensitive in XML, but not in HTML.

and janusweb seems to have a few spots where it looks for the "HEAD" tag, and not "head". document.head might be a good replacement to looking for the tag itself. I have yet to test whether it'll work.


um. I think that's it.

-- Response ended

-- Page fetched on Mon May 20 12:05:39 2024