There were two User Script Sandboxing settings, one on the target and one on the app. I had to set both to No.