Update README.md

Instead of window.getSelection().type, use window.getSelection().isCollapsed (fixes Firefox bug when nothing is selected)