Update online.js

new add fn