moves swipe js to snippet