Fixing Turbolinks issue with JavaScript doc ready scripts

Signed-off-by: Alan Gardner <alan@armoin.com>