diff --git a/app/src/main/assets/css/core/core.css b/app/src/main/assets/css/core/core.css index b57ef4be5..497dd969f 100644 --- a/app/src/main/assets/css/core/core.css +++ b/app/src/main/assets/css/core/core.css @@ -210,7 +210,7 @@ button ._v89 ._54k8._1fl1 { box-shadow: none !important; } -[data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { +[data-sigil=m_login_upsell] [data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { display: none !important; } diff --git a/app/src/main/assets/css/core/core.scss b/app/src/main/assets/css/core/core.scss index 15074674a..8091e2a6b 100644 --- a/app/src/main/assets/css/core/core.scss +++ b/app/src/main/assets/css/core/core.scss @@ -1,6 +1,5 @@ @import "colors"; @import "base"; - @import "core_text"; @import "core_bg"; @import "core_border"; @@ -15,7 +14,7 @@ // box-shadow: none !important; // } -//menu spinner +[data-sigil=m_login_upsell], [data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { display: none !important; } @@ -24,8 +23,6 @@ color: $text !important; } - - .excessItem { outline: $divider !important; } diff --git a/app/src/main/assets/css/themes/custom.css b/app/src/main/assets/css/themes/custom.css index ee27be239..c7e31ed51 100644 --- a/app/src/main/assets/css/themes/custom.css +++ b/app/src/main/assets/css/themes/custom.css @@ -210,7 +210,7 @@ button ._v89 ._54k8._1fl1 { box-shadow: none !important; } -[data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { +[data-sigil=m_login_upsell] [data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { display: none !important; } diff --git a/app/src/main/assets/css/themes/material_amoled.css b/app/src/main/assets/css/themes/material_amoled.css index 6f0440523..7a0554299 100644 --- a/app/src/main/assets/css/themes/material_amoled.css +++ b/app/src/main/assets/css/themes/material_amoled.css @@ -210,7 +210,7 @@ button ._v89 ._54k8._1fl1 { box-shadow: none !important; } -[data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { +[data-sigil=m_login_upsell] [data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { display: none !important; } diff --git a/app/src/main/assets/css/themes/material_dark.css b/app/src/main/assets/css/themes/material_dark.css index 990b51685..f4e209331 100644 --- a/app/src/main/assets/css/themes/material_dark.css +++ b/app/src/main/assets/css/themes/material_dark.css @@ -210,7 +210,7 @@ button ._v89 ._54k8._1fl1 { box-shadow: none !important; } -[data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { +[data-sigil=m_login_upsell] [data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { display: none !important; } diff --git a/app/src/main/assets/css/themes/material_glass.css b/app/src/main/assets/css/themes/material_glass.css index ee16ee2a8..bad6bd44f 100644 --- a/app/src/main/assets/css/themes/material_glass.css +++ b/app/src/main/assets/css/themes/material_glass.css @@ -210,7 +210,7 @@ button ._v89 ._54k8._1fl1 { box-shadow: none !important; } -[data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { +[data-sigil=m_login_upsell] [data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { display: none !important; } diff --git a/app/src/main/assets/css/themes/material_light.css b/app/src/main/assets/css/themes/material_light.css index 55ddebcf3..f4a5dee46 100644 --- a/app/src/main/assets/css/themes/material_light.css +++ b/app/src/main/assets/css/themes/material_light.css @@ -210,7 +210,7 @@ button ._v89 ._54k8._1fl1 { box-shadow: none !important; } -[data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { +[data-sigil=m_login_upsell] [data-sigil="m-loading-indicator-animate m-loading-indicator-root"] { display: none !important; } 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 6981fd1cd..5444fad85 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 4c4e55255..ac62f1425 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 a1fd594f3..8824e6353 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) diff --git a/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt new file mode 100644 index 000000000..ce7489077 --- /dev/null +++ b/app/src/test/kotlin/com/pitchedapps/frost/facebook/FbDomTest.kt @@ -0,0 +1,26 @@ +package com.pitchedapps.frost.facebook + +import com.pitchedapps.frost.internal.authDependent +import com.pitchedapps.frost.internal.testJsoup +import org.junit.BeforeClass +import org.junit.Test +import kotlin.test.assertNotNull + +class FbDomTest { + + companion object { + @BeforeClass + @JvmStatic + fun before() { + authDependent() + } + } + + @Test + fun checkHeaders() { + val doc = testJsoup(FB_URL_BASE) + assertNotNull(doc.getElementById("header")) + assertNotNull(doc.getElementById("mJewelNav")) + } + +} \ No newline at end of file