Note: this document contains spoilers!

JS's JS Policy

How I use javascript on my site and why. I try to outline here exactly all of the javascript functions on my site so you know what's happening and even where to look. See the directory for all of the places where javascript is stored.

Hi there! You're here presumably because you're block Javascript or are concerned about how I am using javascript on this site. Well, for transparency, I've written up this document to outline where javascript is being used and why.

Overview

Pretty much every page uses javascript. Most of the time this is to run fun little easter eggs. Further there are 2 panels on the left and on the right. Each of these are loaded dynamically. The reason for this is that I am very lazy and forgetful, so it is easier for me to maintain the site by having everything I need to change in one place. Hence, without javascript the nav menu might be buggy, not up to date, or behave inconsistently per page. The left, the navigation menu, has hardcoded javascript free fallbacks, since these are pretty important. The right is a panel I included to emulate the archived site this was based off of/ripped from. Since the right panel is pretty insignificant, there is currently no fall back. Most of the links in that panel require javascript anyways so not much is lost if you'd prefer to block javascript.

No cookies are used in this site. No external scripts, not even jquery, are used.

All Pages

On every page there is the nav panel and the right panel as mentioned above. These are loaded dynamically by requesting the code from a LOCAL html file and inserting that text into a certain tag element. You can inspect the source code and locate these, as they are usually suffixed with "-targ" or "-target" with one exception being "nav-insert" which is where the navigation menu gets inserted. I'm very inconsistent, I'm sorry.

Since there are easter eggs in the right panel (hint hint) every site has access to the javascript that runs these. Below is a spoiler of the easter eggs shared by all pages.

Spoil the Easter eggs!
  1. Clicking on the 'ISPs and Corporations" link will cause a duck to appear at a random spot on the screen with a semi-random flip direction (left or right facing).
  2. The copyright text will direct you to the DankWebOfficial tumblr.

Almost all pages load these using javascript, so I won't mention them here on.

Button behaviour in the menu is also handled with javascript. This is bad practice, and should be done with css, but it was a legacy product of the original archived site for some reason. I didn't want to break anything with the site so I left it in and styled it by adding and removing css classes. If you inspect a button aside from the one corresponding to the page you are on you can see this (with javasctipt active) by looking at the tag and on hover see how the class attribute changes.

I have been working on removing any archived javascript from the files, but I may have missed some so bear with me. Because of how old the site is there's a good chance they don't go anywhere meaningful or that they go exclusively to the waybackmachine's archives. I'm still trying to remove all of them, because I forgot to do that early enough on, but never the less,

Home Page

On the home page there are more easter eggs. 2 of these are javascript free, but one requires javascript beyond there redirecting to a page that uses javascript. One of these links redirects to an external page (wikipedia):

See which link (spoiler) The ``Customer's report...'' redirects to an article on the book 'how to lie with statistics'
Other Spoilers
  1. Clicking on the 'Previous Highlights' will take you to a seemingly blank page. However, hidden in the center of the page is a button that takes you back. Maybe there are other things (hint hint, though these require javasctipt)
  2. Clicking 'Danknet Explorer Administration Kit 5...' uses a bunch of alerts. It's very meme. Trust me. It ends with an external redirect... be warned.

Download

The download page uses javascript to fetch details about different files. This was originally done with PHP and sql but neocities doesn't support this, so I converted this into a pretty ad-hoc lookup system using formatted identifier data, like the filename, os, and version, as a file name and the contents as the rest of the data. These are then populated into the tags using document.getElementById(...) calls. Again you can see where the data would get put in the source code by looking for id's with the suffix '-target'. The button also uses javascript to determine where to redirect to start the download. If javascript is disabled, there is a fallback that removes the quick details and replaces it with a normal little button that redirects to my 000webhost.com site where my files are stored. That warning is posted regardless of javascript enabled.

The drop down menus also use javascript to fetch the new data as mentioned above on detected change. As such they don't work if javascript is disabled. They just don't do anything.

System Requirements

This page uses javascript in basically the same way as downloads: fetch data from a file, usually on update from the drop down menus etc. However, there is no fall back from this yet. Requirements will be posted in the readme of the downloads directory on the 000webhost site, and in the future the fall back will show all versions like the readme.

Remainder

The remaining sites do not use any additional javascript.

Directory