Animation Disabler is installed as a rack middleware - it will be
instantiated once and the call method will be called by multiple
requests.
The code was using instance variables on the middleware for information
about individual requests. When multiple requests were made at the same
time, the subsequent request would replace the status/headers/body of
the original request, causing the original request to return the
response of the subsequent request.
The W3C Validator was reporting an error:
> Element style not allowed as child of element body in this context.
>
> Contexts in which element style may be used:
> Where metadata content is expected.
> In a noscript element that is a child of a head element.
> Content model for element body:
> Flow content.
It looks like there can't be any <style> tags inside the <body> element
[1].
The <script> part of the markup template remains at the end of the
<body> element because it only makes sense if jQuery has already been
defined, and jQuery could be defined anywhere inside the <head> or
<body> elements.
[1] https://html.spec.whatwg.org/multipage/semantics.html#the-style-element
If it receives a falsey (false or nil) it won't do anything.
If it receives true, it will disable animations on the '*' css selector
If it receives a string, it will use that string as the css selector
It will still always disable css for jQuery if it's around.