`xxx.length === 0` to `!xxx.length`, `xxx.length > 0` to `xxx.length`
Extract commands from handler.
Extract variables($window, $scrollbar) from local.
Rename handler to sEvent.
Fixed losing focus when dialog open and close. (Tested on Chrome, FF)
Fixed #410. Create a new link when there is no anchor on range.
Merge pull request #413 from HackerWins/feature/some-refactoring

Fixed #364, #410.