fix classList.add.apply not working in Firefox