Skip to content

Turn a feature off ​

A feature is one script in js/features/ that does one thing for the whole site, such as the AJAX transitions or the smooth scrolling. Each page loads the features it runs with one line each in its head. There is no switch for them in js/config.js: a page whose head lacks a feature's line runs without it.

How to access ​

Any page → <head>

The lines sit under their own note, one per feature:

html
<!-- Features: one script each; to turn one off, delete its line from every page -->
<script src="js/features/header.js" defer></script>
<script src="js/features/smooth-scrolling.js" defer></script>
<script src="js/features/cursor.js" defer></script>
<script src="js/features/lightbox.js" defer></script>
<script src="js/features/horizontal-scroll.js" defer></script>
<script src="js/features/fixed-reveal.js" defer></script>
<script src="js/features/ajax-transitions.js" defer></script>

The seven features ​

LineWhat it does
header.jsThe header: it hides as the page scrolls down and comes back on the way up
smooth-scrolling.jsSmooth scrolling: the page glides to a stop instead of jumping by the wheel's steps
cursor.jsThe cursor: a ring that follows the pointer
lightbox.jsThe lightbox, which opens pictures and videos over the page
horizontal-scroll.jsHorizontal Scroll, the sections whose panels ride sideways as the page scrolls
fixed-reveal.jsThe footer reveal: the footer waits under the page and shows as the page scrolls off it
ajax-transitions.jsAJAX transitions: a link opens the next page with an animation, without a full reload

Every page carries all seven, in this order. Keep the order of the lines you leave.

Turning a feature off everywhere ​

Delete the feature's line from every page with one search and replace, as Edit every page at once shows. Regex, here the cursor:

SearchReplace
\n\s*<script src="js/features/cursor.js" defer></script>(nothing)

There are 61 results, one per page. Reload a page: the pointer is the system's own again.

Turning a feature off on one page ​

Delete its line from that page's head alone. With AJAX transitions on, the head is loaded only once, by the page a visitor opens first: a feature that page has keeps running on every page they reach from it, the one without the line included. The page goes without the feature only when a visitor opens it first, or reloads it. So a feature that must never run on a page has to go from every page, as above.

Horizontal Scroll

Without horizontal-scroll.js, a Horizontal Scroll section still rides sideways in browsers that animate it by CSS alone, Chrome among them. To take such a section off a page, delete its <section>: Move a section.

The same holds for AJAX transitions: a page opened first without ajax-transitions.js opens each of its links as a full page load, and so does every page after it that lacks the line.

Next: AJAX transitions and your own scripts.