merge js functions from webim-ui