abstract mobile interactions js

DRY up repeated code and simplify logic.
Merge pull request #2221 from samccone/sjs/clean-up-mobile-actions

abstract mobile interactions js