diff options
author | Allan Wang <me@allanwang.ca> | 2018-03-11 19:24:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-11 19:24:32 -0400 |
commit | fe51373f5a95323d64f6d966888a2c6c62a36deb (patch) | |
tree | 328bf7ab5bf00f01e070e9d84ff71cac59b0ecf1 /app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt | |
parent | 67988a25d83fc10b187fcc821c3ceacfad0195d5 (diff) | |
download | frost-fe51373f5a95323d64f6d966888a2c6c62a36deb.tar.gz frost-fe51373f5a95323d64f6d966888a2c6c62a36deb.tar.bz2 frost-fe51373f5a95323d64f6d966888a2c6c62a36deb.zip |
Enhancement/debug mode (#779)
* Update changelog
* Improve debugger
* Remove need for mapping urls
* Remove excess logs
* Clean up
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt index 7be8cd3c..b4926355 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsActions.kt @@ -16,6 +16,7 @@ enum class JsActions(body: String) : InjectorContract { LOGIN_CHECK("document.getElementById('signup-button')&&Frost.loadLogin();"), BASE_HREF("""document.write("<base href='$FB_URL_BASE'/>");"""), FETCH_BODY("""setTimeout(function(){var e=document.querySelector("main");e||(e=document.querySelector("body")),Frost.handleHtml(e.outerHTML)},1e2);"""), + RETURN_BODY("return(document.getElementsByTagName('html')[0].innerHTML);"), CREATE_POST(clickBySelector("button[name=view_overview]")), // CREATE_MSG(clickBySelector("a[rel=dialog]")), /** @@ -23,7 +24,7 @@ enum class JsActions(body: String) : InjectorContract { */ EMPTY(""); - val function = "!function(){$body}();" + val function = "(function(){$body})();" override fun inject(webView: WebView, callback: (() -> Unit)?) = JsInjector(function).inject(webView, callback) |