Add js functionality