add selector.js, fix bugs, add app selector basic mode demo