Set a relative path for stacks' images and stylesheets in 404 page?

I believe in the original post from Gary at Doobox, he used javascript.

On the real 404 page>page inspector>CSS
Body{
Display:none;
}

On real 404 page inspector > javascript

    window.location = "https://yoursite/friendly404.page";

Then build the “friendly404” page normally in RW.

I did this on a few sites in RW6 and I thought the script was added to header. Now in RW7 they show up under the javascript tag, which seems to put them in the body of the DOM. Anyway it does work and the page ends up on the redirected 404 page.