merge from miniflycn/badjs