Well it's from app_window.js again; I didn't rewrite them. But seems we can simplify it.