Shared JavaScript for webview support in calabash