Where do I add my custom JavaScript code?

Navigate to the options panel Advanced → Global Settings, where you'll find four provided sections to add scripts.