Fixed multiple confirmation popups error (apparently turbolinks were the root of the problem, had to include the JavaScript in the head instead of before body, which sucks but oh well)