diff options
author | Allan Wang <me@allanwang.ca> | 2018-09-27 20:49:45 -0400 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-09-27 20:49:45 -0400 |
commit | 857fe0a28ccb5b8f7f3caef4ecd477596fe2468c (patch) | |
tree | 2ab785f2c5856cee890e8fa1aa2312341a047c86 /app/src/main/kotlin | |
parent | 2bc366f8f4501a93d773c8a6d8ad103d05cce08d (diff) | |
download | frost-857fe0a28ccb5b8f7f3caef4ecd477596fe2468c.tar.gz frost-857fe0a28ccb5b8f7f3caef4ecd477596fe2468c.tar.bz2 frost-857fe0a28ccb5b8f7f3caef4ecd477596fe2468c.zip |
Add tests and move header hider to css
Diffstat (limited to 'app/src/main/kotlin')
3 files changed, 7 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt index 6981fd1c..5444fad8 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt @@ -8,9 +8,9 @@ import android.webkit.WebView * List of elements to hide */ enum class CssHider(vararg val items: String) : InjectorContract { - CORE("[data-sigil=m_login_upsell]", "role=progressbar"), - // HEADER("#header", "[data-sigil=MTopBlueBarHeader]", -// "#header-notices", "[data-sigil*=m-promo-jewel-header]"), + CORE("[data-sigil=m_login_upsell]", "[role=progressbar]"), + HEADER("#header", "#mJewelNav", "[data-sigil=MTopBlueBarHeader]", + "#header-notices", "[data-sigil*=m-promo-jewel-header]"), ADS("article[data-xt*=sponsor]", "article[data-store*=sponsor]"), PEOPLE_YOU_MAY_KNOW("article._d2r"), diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt index 4c4e5525..ac62f142 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt @@ -82,7 +82,7 @@ class DebugWebView @JvmOverloads constructor( if (url.isFacebookUrl) view.jsInject( CssAssets.ROUND_ICONS.maybe(Prefs.showRoundedIcons), - CssHider.CORE, +// CssHider.CORE, CssHider.COMPOSER.maybe(!Prefs.showComposer), CssHider.PEOPLE_YOU_MAY_KNOW.maybe(!Prefs.showSuggestedFriends), CssHider.SUGGESTED_GROUPS.maybe(!Prefs.showSuggestedGroups), diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt index a1fd594f..8824e635 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt @@ -65,7 +65,8 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() { if (url.isFacebookUrl) view.jsInject( CssAssets.ROUND_ICONS.maybe(Prefs.showRoundedIcons), - CssHider.CORE, +// CssHider.CORE, + CssHider.HEADER, CssHider.COMPOSER.maybe(!Prefs.showComposer), CssHider.PEOPLE_YOU_MAY_KNOW.maybe(!Prefs.showSuggestedFriends), CssHider.SUGGESTED_GROUPS.maybe(!Prefs.showSuggestedGroups), @@ -76,7 +77,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() { JsAssets.CLICK_A, CssHider.ADS.maybe(!Prefs.showFacebookAds), JsAssets.CONTEXT_A, - JsAssets.HEADER_HIDER, +// JsAssets.HEADER_HIDER, JsAssets.MEDIA) else refresh.onNext(false) |