Clean up the Gecko script's onCaretMoved()