Move select2 playerlists to a JS function rather than a file