Simplify applet check in ui.js.