develop javascript widget