refactor follow-mouse.js