put share logic in dom and app.js