making the dominant color function work with turbolinks