aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-11-22 12:06:07 -0800
committerAllan Wang <me@allanwang.ca>2021-11-22 12:06:07 -0800
commitf448eaf4c21c40778663f2d11b6f6f8ad8855b0f (patch)
tree1094d0b1de61c927b63b683fce30200ebf6d4012 /app/src
parentba458a612610512e28b65bafcf74177ddc77bbbe (diff)
downloadfrost-f448eaf4c21c40778663f2d11b6f6f8ad8855b0f.tar.gz
frost-f448eaf4c21c40778663f2d11b6f6f8ad8855b0f.tar.bz2
frost-f448eaf4c21c40778663f2d11b6f6f8ad8855b0f.zip
Default menu to home as some entries forcefully redirect there
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt12
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAsset.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt2
3 files changed, 12 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt
index 5d4df797..7d9d5c12 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbItem.kt
@@ -46,14 +46,20 @@ enum class FbItem(
FRIENDS(R.string.friends, GoogleMaterial.Icon.gmd_person_add, "friends/center/requests"),
GROUPS(R.string.groups, GoogleMaterial.Icon.gmd_group, "groups"),
MARKETPLACE(R.string.marketplace, GoogleMaterial.Icon.gmd_store, "marketplace"),
+
/*
* Unlike other urls, menus cannot be linked directly as it is a soft reference. Instead, we can
* pick any url with the blue bar and manually click to enter the menu.
- * The notifications page was picked arbitrarily as I assume it has the smallest loading footprint.
+ * We pick home.php as some back interactions default to home regardless of the base url.
*/
- MENU(R.string.menu, GoogleMaterial.Icon.gmd_menu, "notifications.php"),
+ MENU(R.string.menu, GoogleMaterial.Icon.gmd_menu, "home.php"),
MESSAGES(R.string.messages, MaterialDesignIconic.Icon.gmi_comments, "messages"),
- MESSENGER(R.string.messenger, CommunityMaterial.Icon2.cmd_facebook_messenger, "", prefix = HTTPS_MESSENGER_COM),
+ MESSENGER(
+ R.string.messenger,
+ CommunityMaterial.Icon2.cmd_facebook_messenger,
+ "",
+ prefix = HTTPS_MESSENGER_COM
+ ),
NOTES(R.string.notes, CommunityMaterial.Icon3.cmd_note, "notes"),
NOTIFICATIONS(R.string.notifications, MaterialDesignIconic.Icon.gmi_globe, "notifications"),
ON_THIS_DAY(R.string.on_this_day, GoogleMaterial.Icon.gmd_today, "onthisday"),
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAsset.kt b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAsset.kt
index a1f66520..39e2332a 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAsset.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/CssAsset.kt
@@ -26,9 +26,9 @@ enum class CssAsset(private val content: String) : InjectorContract {
FullSizeImage("div._4prr[style*=\"max-width\"][style*=\"max-height\"]{max-width:none !important;max-height:none !important}"),
/*
- * Remove top margin and hide some contents from the top bar and notification page (as it's our base url)
+ * Remove top margin and hide some contents from the top bar and home page (as it's our base url)
*/
- Menu("#bookmarks_flyout{margin-top:0 !important}#notifications_list{display:none !important}")
+ Menu("#bookmarks_flyout{margin-top:0 !important}#m_news_feed_stream,#MComposer{display:none !important}")
;
val injector: JsInjector by lazy {
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 ad7f7858..3b332199 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
@@ -135,7 +135,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
JsAssets.DOCUMENT_WATCHER,
JsAssets.HORIZONTAL_SCROLLING,
JsAssets.AUTO_RESIZE_TEXTAREA.maybe(prefs.autoExpandTextBox),
-// JsAssets.CLICK_A,
+ JsAssets.CLICK_A,
JsAssets.CONTEXT_A,
JsAssets.MEDIA,
JsAssets.SCROLL_STOP,