move button and swipe control to plugin