From c3ad96af1db7b457005b13f693ee855bbbc7a80b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 2 Apr 2019 23:34:49 -0400 Subject: Show header when not jewel nav --- .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .../kotlin/com/pitchedapps/frost/injectors/CssHider.kt | 2 +- .../kotlin/com/pitchedapps/frost/injectors/JsAssets.kt | 2 +- .../com/pitchedapps/frost/web/FrostWebViewClients.kt | 1 - .../kotlin/com/pitchedapps/frost/web/LoginWebView.kt | 1 - app/src/web/assets/js/header_hider.js | 12 ------------ app/src/web/assets/js/header_hider.ts | 17 ----------------- 7 files changed, 8 insertions(+), 33 deletions(-) create mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 app/src/web/assets/js/header_hider.js delete mode 100644 app/src/web/assets/js/header_hider.ts diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..30d5fbc6 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file 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 292b7ff5..891a1dbf 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssHider.kt @@ -26,7 +26,7 @@ import android.webkit.WebView enum class CssHider(vararg val items: String) : InjectorContract { CORE("[data-sigil=m_login_upsell]", "[role=progressbar]"), HEADER( - "#header", "#mJewelNav", "[data-sigil=MTopBlueBarHeader]", + "#header:not(.mFuturePageHeader):not(.titled)", "#mJewelNav", "[data-sigil=MTopBlueBarHeader]", "#header-notices", "[data-sigil*=m-promo-jewel-header]" ), ADS( diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt index e0be7977..ad42418e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt @@ -33,7 +33,7 @@ import java.util.Locale * The enum name must match the css file name */ enum class JsAssets : InjectorContract { - MENU, CLICK_A, CONTEXT_A, MEDIA, HEADER_BADGES, HEADER_HIDER, TEXTAREA_LISTENER, NOTIF_MSG, + MENU, CLICK_A, CONTEXT_A, MEDIA, HEADER_BADGES, TEXTAREA_LISTENER, NOTIF_MSG, DOCUMENT_WATCHER ; 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 c5c4ad28..003ed7f9 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt @@ -105,7 +105,6 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() { JsAssets.CLICK_A, CssHider.ADS.maybe(!Prefs.showFacebookAds), JsAssets.CONTEXT_A, -// JsAssets.HEADER_HIDER, JsAssets.MEDIA ) else diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt index c21ce93b..1c300b03 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/LoginWebView.kt @@ -98,7 +98,6 @@ class LoginWebView @JvmOverloads constructor( view.setBackgroundColor(Color.TRANSPARENT) if (url.isFacebookUrl) view.jsInject( - JsAssets.HEADER_HIDER, CssHider.CORE, Prefs.themeInjector ) diff --git a/app/src/web/assets/js/header_hider.js b/app/src/web/assets/js/header_hider.js deleted file mode 100644 index faa9f66d..00000000 --- a/app/src/web/assets/js/header_hider.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -(function () { - var header = document.querySelector('#header'); - if (!header) { - return; - } - var jewel = header.querySelector('#mJewelNav'); - if (!jewel) { - return; - } - header.style.display = 'none'; -}).call(undefined); diff --git a/app/src/web/assets/js/header_hider.ts b/app/src/web/assets/js/header_hider.ts deleted file mode 100644 index 1a8f27f2..00000000 --- a/app/src/web/assets/js/header_hider.ts +++ /dev/null @@ -1,17 +0,0 @@ -(function () { - const header = document.querySelector('#header'); - - if (!header) { - return - } - - const jewel = header.querySelector('#mJewelNav'); - - if (!jewel) { - return - } - - (header).style.display = 'none' -}).call(undefined); - - -- cgit v1.2.3 From 54361fc2840e52f56ccf1fec8d4f595c8c0782ee Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 2 Apr 2019 23:37:06 -0400 Subject: Update changelog --- app/src/main/res/xml/frost_changelog.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/res/xml/frost_changelog.xml b/app/src/main/res/xml/frost_changelog.xml index 2c5fc03e..c9b8477e 100644 --- a/app/src/main/res/xml/frost_changelog.xml +++ b/app/src/main/res/xml/frost_changelog.xml @@ -6,6 +6,11 @@ --> + + + + + -- cgit v1.2.3