http://q3o3hdjbia2v4hjag567piljrz6gmfwfmxjzaqq4qstmicnmujxp45id.onion/guides/how-to-safely-configure-the-tor-browser
Enter about:config in the URL bar, then when prompted, click 'Accept the Risk and Continue'. Next, enter the word 'javascript' into the search box, then close to the top of the list an option called 'javascript.enabled' should show. Click the icon on the right hand side to change this from 'true' to 'false', which will ensure it is completely disabled within the browser engine, even if the safety settings fail for whatever reason.