diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | app/src/main/assets/css/core/main.compact.css | 10 | ||||
-rw-r--r-- | app/src/main/assets/css/core/main.scss | 9 | ||||
-rw-r--r-- | app/src/main/assets/js/click_a.js (renamed from app/src/main/assets/js/menu_click.js) | 12 | ||||
-rw-r--r-- | app/src/main/assets/js/click_a.min.js | 11 | ||||
-rw-r--r-- | app/src/main/assets/js/click_interceptor.js | 19 | ||||
-rw-r--r-- | app/src/main/assets/js/click_interceptor_bak.js | 14 | ||||
-rw-r--r-- | app/src/main/assets/js/menu_click.min.js | 9 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt | 9 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt | 17 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt | 5 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt | 2 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt | 2 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt | 8 |
14 files changed, 69 insertions, 62 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 67366d71..ee23ad9e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,8 +22,8 @@ android:theme="@style/FrostTheme.Splash"> <activity android:name=".StartActivity" - android:noHistory="true" android:label="@string/app_name" + android:noHistory="true" android:theme="@style/FrostTheme.Splash"> <intent-filter> <action android:name="android.intent.action.MAIN" /> @@ -40,6 +40,7 @@ android:name=".WebOverlayActivity" android:hardwareAccelerated="true" android:label="@string/app_name" + android:launchMode="singleTop" android:theme="@style/FrostTheme.Overlay" /> <activity @@ -55,6 +56,7 @@ android:autoVerify="true" tools:ignore="UnusedAttribute"> <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> diff --git a/app/src/main/assets/css/core/main.compact.css b/app/src/main/assets/css/core/main.compact.css index 335ee243..fd49b19c 100644 --- a/app/src/main/assets/css/core/main.compact.css +++ b/app/src/main/assets/css/core/main.compact.css @@ -1,12 +1,12 @@ #viewport { background: #451515 !important; } -body, #root, #header, div[style*="background-color"], ._55wo, ._1upc, input, ._2f9r, ._59e9, ._5pz4, ._5lp4, ._5lp5, .container, .subpage, ._5n_f, #static_templates, .tlBody, #timelineBody, .timelineX, .timeline .feed, .timeline .tlPrelude, .timeline .tlFeedPlaceholder, ._4_d0, .al, ._1gkq, ._5c5b, ._d4i, ._577z, ._2u4w, ._3u9p, ._3u9t, ._2v9s, ._5c9u, div._5y57::before, ._59f6._55so::before, .structuredPublisher, ._94v, ._vqv, ._5lp5, ._55wm, ._2om3, ._2ol-, ._1f9d, ._vee, .acw, ._4_xl, ._1p70, ._1p70, ._1ih_, ._51v6, ._u2c, ._484w, ._3ils, ._rm7, ._32qk, ._d01, ._2y60, ._5fu3, ._2foa, ._2y5_, ._38o9, ._1kb, ._3f50, .mentions-placeholder, .mentions, .mentions-shadow, .mentions-measurer, .acg, ._59tu, ._52z5, ._4l9b, ._4gj3, .groupChromeView, ._uww, textarea, ._15n_, ._skt, ._5f28, ._14_j, ._3bg5, ._53_-, ._52x1 { background: rgba(255, 0, 255, 0.02) !important; } +body, #root, #header, div[style*="background-color"], ._55wo, ._1upc, input, ._2f9r, ._59e9, ._5pz4, ._5lp4, ._5lp5, .container, .subpage, ._5n_f, #static_templates, .tlBody, #timelineBody, .timelineX, .timeline .feed, .timeline .tlPrelude, .timeline .tlFeedPlaceholder, ._4_d0, .al, ._1gkq, ._5c5b, ._d4i, ._577z, ._2u4w, ._3u9p, ._3u9t, ._2v9s, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._5c9u, div._5y57::before, ._59f6._55so::before, .structuredPublisher, ._94v, ._vqv, ._5lp5, ._55wm, ._2om3, ._2ol-, ._1f9d, ._vee, .acw, ._4_xl, ._1p70, ._1p70, ._1ih_, ._51v6, ._u2c, ._484w, ._3ils, ._rm7, ._32qk, ._d01, ._2y60, ._5fu3, ._2foa, ._2y5_, ._38o9, ._1kb, ._3f50, .mentions-placeholder, .mentions, .mentions-shadow, .mentions-measurer, .acg, ._59tu, ._52z5, ._4l9b, ._4gj3, .groupChromeView, ._uww, textarea, ._15n_, ._skt, ._5f28, ._14_j, ._3bg5, ._53_-, ._52x1 { background: rgba(255, 0, 255, 0.02) !important; } .jewel, .flyout, ._13e_, ._5-lw, ._5c0e, .jx-result, ._336p { background: #451515 !important; } -button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(217, 129, 129, 0.2) !important; } +button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, ._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: rgba(217, 129, 129, 0.2) !important; } -body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, h1, h2, h3, h4, h5, h6 { color: #d7b0d7 !important; } +body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, h1, h2, h3, h4, h5, h6 { color: #d7b0d7 !important; } ._15kl::before, ._5j35::after, ._2k4b, ._3to7, ._4nw8 { border-left: 1px solid rgba(215, 176, 215, 0.3) !important; } @@ -14,9 +14,9 @@ body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._1mx0, ._15n_, ._3-2-, ._27ve, ._2s20, ._gui, ._2s21 > *::after, ._32qk, ._d00, ._d01, ._38o9, ._2u4w, ._3u9t, ._55fj, ._52x1, ._3wjp, ._usq, ._2cul:before, ._13e_, .jewel .flyout, ._3bg5 ._52x6, ._3on6, ._2om3, ._2ol-, ._56d8, .al, ._1gkq, ._5fjv, ._5fjw, ._4z83 { border-top: 1px solid rgba(215, 176, 215, 0.3) !important; } -._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5lp5, ._3-2-, ._3to6, ._ir5, ._4nw6, ._4nwh, ._27ve, div._51v6::before, ._3c9h::before, ._2s20, ._gui, ._5jku, ._2foa, ._2y60, ._5fu3, ._4en9, ._1kb:not(:last-child) ._1kc, ._5pz4, ._5lp4, ._5lp5, ._3on6, ._5h6z, ._5h6x, ._2om4, ._5fjw > div, ._5fjv > :first-child, ._5fjw > :first-child, ._5fjv, ._5fjw, ._4z83 { border-bottom: 1px solid rgba(215, 176, 215, 0.3) !important; } +._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5lp5, ._3-2-, ._3to6, ._ir5, ._4nw6, ._4nwh, ._27ve, div._51v6::before, ._3c9h::before, ._2s20, ._gui, ._5jku, ._2foa, ._2y60, ._5fu3, ._4en9, ._1kb:not(:last-child) ._1kc, ._5pz4, ._5lp4, ._5lp5, ._3on6, ._5h6z, ._5h6x, ._2om4, ._5fjw > div, ._5fjv > :first-child, ._5fjw > :first-child, ._5fjv, ._5fjw, ._4z83 { border-bottom: 1px solid rgba(215, 176, 215, 0.3) !important; } -._d4i, ._4e8n, ._uww, .mentions-placeholder, .mentions-shadow, .mentions-measurer, ._5whq, ._59tt, ._41ft::after, .jx-tokenizer, ._3uqf, ._4756, ._1rrd, ._5n_f { border: 1px solid rgba(215, 176, 215, 0.3) !important; } +._d4i, ._1_y5, ._4e8n, ._uww, .mentions-placeholder, .mentions-shadow, .mentions-measurer, ._5whq, ._59tt, ._41ft::after, .jx-tokenizer, ._3uqf, ._4756, ._1rrd, ._5n_f { border: 1px solid rgba(215, 176, 215, 0.3) !important; } ._4o58::after, .acw, .aclb, ._4qax, ._5h8f { border-color: rgba(215, 176, 215, 0.3) !important; } diff --git a/app/src/main/assets/css/core/main.scss b/app/src/main/assets/css/core/main.scss index e2b1b933..b13f79e3 100644 --- a/app/src/main/assets/css/core/main.scss +++ b/app/src/main/assets/css/core/main.scss @@ -7,7 +7,7 @@ body, #root, #header, div[style*="background-color"], ._55wo, ._1upc, input, ._2f9r, ._59e9, ._5pz4, ._5lp4, ._5lp5, .container, .subpage, ._5n_f, #static_templates, .tlBody, #timelineBody, .timelineX, .timeline .feed, .timeline .tlPrelude, .timeline .tlFeedPlaceholder, ._4_d0, .al, ._1gkq, ._5c5b, -._d4i, ._577z, ._2u4w, ._3u9p, ._3u9t, ._2v9s, +._d4i, ._577z, ._2u4w, ._3u9p, ._3u9t, ._2v9s, ._cw4, ._5_y-, ._5_y_, ._5_z3, ._cwy, ._5_z0, ._5_z1, ._5_z2, ._2mtc, ._206a, ._1_-1, ._5c9u, div._5y57::before, ._59f6._55so::before, .structuredPublisher, ._94v, ._vqv, ._5lp5, ._55wm, ._2om3, ._2ol-, ._1f9d, ._vee, .acw, ._4_xl, ._1p70, ._1p70, ._1ih_, ._51v6, ._u2c, ._484w, ._3ils, ._rm7, ._32qk, ._d01, ._2y60, ._5fu3, ._2foa, ._2y5_, ._38o9, ._1kb, ._3f50, .mentions-placeholder, .mentions, .mentions-shadow, .mentions-measurer, .acg, ._59tu, ._52z5, ._4l9b, ._4gj3, .groupChromeView, @@ -21,14 +21,14 @@ body, #root, #header, div[style*="background-color"], ._55wo, ._1upc, input, ._2 button, button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._590n, ._4g8h, ._5xo2, ._5u5a::before, ._4u3j, ._15ks, ._5hua, ._59tt, ._41ft, .jx-tokenizer, ._55fj, .excessItem, -._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, +._4e8n, ._5pxa._3uj9, ._5n_5, ._u2d, ._56bu::before, ._5h8f, ._d00, ._2066, ._4qax, .aclb, ._4756, ._w34, ._56bv::before, ._5769, ._34iv, .acbk { background: $background2 !important; } body, input, ._43mh, .touch .btn, p, span, .fcg, button, ._52j9, ._52jb, ._52ja, ._5j35, ._rnk, ._24u0, ._1g06, ._14ye, .fcb, ._56cz._56c_, ._1gk_, ._55fj, -textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, +textarea, ._24pi, ._4en9, ._1kb, ._5p7j, ._2klz, ._5780, ._5781, ._5782, ._3u9u, ._3u9_, ._3u9s, ._1hcx, ._2066, ._1_-1, ._27vp, ._4nwe, ._4nw9, ._27vi, .appCenterAppInfo, .appCenterPermissions, ._3c9l, ._3c9m, ._4jn_, ._32qt, ._3mom, ._3moo, ._-7o, ._d00, ._d01, .mentions-input, .mentions-placeholder, .fcw, ._5-7t, .fcl, ._4qas, .thread-title, .title, ._46pa, ._336p, ._1rrd, ._2om4, ._3m1m, ._2om2, ._5n_e, h1, h2, h3, h4, h5, h6 { @@ -52,7 +52,7 @@ h1, h2, h3, h4, h5, h6 { border-top: 1px solid $divider !important; } -._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, +._15ny::after, ._2u4w, ._577z:not(:last-child) ._ygd, ._3u9u, ._3mgz, ._52x6, ._2066, ._ap1, ._52x1, ._59tu, ._usq, ._13e_, ._59f6._55so::before, ._4gj3, .jx-result, ._2om3, ._2ol-, ._1f9d, ._vef, ._55x2 > *, .al, ._44qk, ._1gkq, ._5lp5, ._3-2-, ._3to6, ._ir5, ._4nw6, ._4nwh, ._27ve, div._51v6::before, ._3c9h::before, ._2s20, ._gui, ._5jku, ._2foa, ._2y60, ._5fu3, ._4en9, ._1kb:not(:last-child) ._1kc, ._5pz4, ._5lp4, ._5lp5, ._3on6, ._5h6z, ._5h6x, ._2om4, ._5fjw > div, ._5fjv > :first-child, ._5fjw > :first-child, ._5fjv, ._5fjw, ._4z83 { @@ -61,6 +61,7 @@ h1, h2, h3, h4, h5, h6 { //friend card border ._d4i, +._1_y5, ._4e8n, ._uww, .mentions-placeholder, .mentions-shadow, .mentions-measurer, ._5whq, ._59tt, ._41ft::after, .jx-tokenizer, ._3uqf, ._4756, ._1rrd, ._5n_f { border: 1px solid $divider !important; } diff --git a/app/src/main/assets/js/menu_click.js b/app/src/main/assets/js/click_a.js index 403689eb..d3eb8631 100644 --- a/app/src/main/assets/js/menu_click.js +++ b/app/src/main/assets/js/click_a.js @@ -1,15 +1,17 @@ // we will handle click events -console.log('Registering menu click'); -document.addEventListener('click', function _menuClick(e) { +console.log('Registering frost_a click'); + +var _frostAClick = function(e) { var element = e.target || e.srcElement; if (element.tagName !== 'A') element = element.parentNode; if (element.tagName === 'A' && element.getAttribute('href') !== '#') { var url = element.getAttribute('href'); - console.log('Click Intercept'); - console.log(url); + console.log('Click Intercept', url); Frost.loadUrl(url); e.stopPropagation(); e.preventDefault(); } -}, true); +} + +document.addEventListener('click', _frostAClick, true); diff --git a/app/src/main/assets/js/click_a.min.js b/app/src/main/assets/js/click_a.min.js new file mode 100644 index 00000000..ff4a3d4c --- /dev/null +++ b/app/src/main/assets/js/click_a.min.js @@ -0,0 +1,11 @@ +console.log("Registering frost_a click") + +;var _frostAClick=function(t){ +var e=t.target||t.srcElement +;if("A"!==e.tagName&&(e=e.parentNode),"A"===e.tagName&&"#"!==e.getAttribute("href")){ +var r=e.getAttribute("href") +;console.log("Click Intercept",r),Frost.loadUrl(r),t.stopPropagation(), +t.preventDefault() +} +} +;document.addEventListener("click",_frostAClick,!0);
\ No newline at end of file diff --git a/app/src/main/assets/js/click_interceptor.js b/app/src/main/assets/js/click_interceptor.js index 238b31d3..ce55f669 100644 --- a/app/src/main/assets/js/click_interceptor.js +++ b/app/src/main/assets/js/click_interceptor.js @@ -1,15 +1,6 @@ -// generic click handler -document.on('click', function (e) { - e = e || window.event; - e.preventDefault(); +// we will handle click events +console.log('Registering click interceptor'); +document.addEventListener('click', function _menuClick(e) { var element = e.target || e.srcElement; - if (element.tagName !== 'A') - element = element.parentNode; - if (element.tagName === 'A') { - var url = element.href; - console.log('Generic Click Intercept'); - console.log(url); - // Frost.loadUrl(url); - } - return false; -}); + console.log(element.tagName); +}, true); diff --git a/app/src/main/assets/js/click_interceptor_bak.js b/app/src/main/assets/js/click_interceptor_bak.js deleted file mode 100644 index d541ccd2..00000000 --- a/app/src/main/assets/js/click_interceptor_bak.js +++ /dev/null @@ -1,14 +0,0 @@ -// generic click handler -document.onclick = function(e) { - e = e || window.event; - var element = e.target || e.srcElement; - if (element.tagName !== 'A') - element = element.parentNode; - if (element.tagName === 'A') { - var url = element.href; - console.log('Generic Click Intercept'); - console.log(url); - // Frost.loadUrl(url); - } - return false; -}; diff --git a/app/src/main/assets/js/menu_click.min.js b/app/src/main/assets/js/menu_click.min.js deleted file mode 100644 index 60671265..00000000 --- a/app/src/main/assets/js/menu_click.min.js +++ /dev/null @@ -1,9 +0,0 @@ -console.log("Registering menu click"),document.addEventListener("click",function(e){ -var t=e.target||e.srcElement -;if("A"!==t.tagName&&(t=t.parentNode),"A"===t.tagName&&"#"!==t.getAttribute("href")){ -var o=t.getAttribute("href") -;console.log("Click Intercept"),console.log(o),Frost.loadUrl(o), -e.stopPropagation(), -e.preventDefault() -} -},!0);
\ No newline at end of file diff --git a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt index 759e8298..9014b50d 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt @@ -18,6 +18,7 @@ import co.zsmb.materialdrawerkt.builders.Builder import co.zsmb.materialdrawerkt.builders.accountHeader import co.zsmb.materialdrawerkt.builders.drawer import co.zsmb.materialdrawerkt.draweritems.badgeable.primaryItem +import co.zsmb.materialdrawerkt.draweritems.divider import co.zsmb.materialdrawerkt.draweritems.profile.profile import co.zsmb.materialdrawerkt.draweritems.profile.profileSetting import com.mikepenz.google_material_typeface_library.GoogleMaterial @@ -226,9 +227,17 @@ class MainActivity : BaseActivity() { } } drawerHeader.setActiveProfile(Prefs.userId) + primaryItem(FbTab.FEED_MOST_RECENT) + primaryItem(FbTab.FEED_TOP_STORIES) primaryItem(FbTab.ACTIVITY_LOG) + divider() + primaryItem(FbTab.EVENTS) + primaryItem(FbTab.BIRTHDAYS) + divider() primaryItem(FbTab.PHOTOS) primaryItem(FbTab.GROUPS) + primaryItem(FbTab.PAGES) + primaryItem(FbTab.SAVED) } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt index 8df7f1bd..665e32b4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt @@ -1,5 +1,6 @@ package com.pitchedapps.frost +import android.content.Intent import android.os.Bundle import android.support.design.widget.CoordinatorLayout import android.support.v7.app.AppCompatActivity @@ -50,12 +51,26 @@ open class WebOverlayActivity : AppCompatActivity() { frostWeb.web.setupWebview(url) frostWeb.web.addTitleListener({ toolbar.title = it }) - L.d("UU $userId") if (userId != Prefs.userId) FbCookie.switchUser(userId) { frostWeb.web.loadBaseUrl() } else frostWeb.web.loadBaseUrl() } /** + * Manage url loadings + * This is usually only called when multiple listeners are added and inject the same url + * We will avoid reloading if the url is the same + */ + override fun onNewIntent(intent: Intent) { + super.onNewIntent(intent) + val newUrl = intent.extras!!.getString(ARG_URL).formattedFbUrl + if (url != newUrl) { + this.intent = intent + frostWeb.web.baseUrl = newUrl + frostWeb.web.loadBaseUrl() + } + } + + /** * Our theme for the overlay should be fully opaque */ fun theme() { diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt index 95991d90..4deef24c 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt @@ -12,7 +12,7 @@ import com.pitchedapps.frost.web.FrostWebViewCore enum class FbTab(@StringRes val titleId: Int, val icon: IIcon, relativeUrl: String, val webClient: ((webCore: FrostWebViewCore) -> FrostWebViewClient)? = null) { FEED(R.string.feed, CommunityMaterial.Icon.cmd_newspaper, ""), - FEED_MOST_RECENT(R.string.most_recent, GoogleMaterial.Icon.gmd_grade, "/?sk=h_chr"), + FEED_MOST_RECENT(R.string.most_recent, GoogleMaterial.Icon.gmd_history, "/?sk=h_chr"), FEED_TOP_STORIES(R.string.top_stories, GoogleMaterial.Icon.gmd_star, "/?sk=h_nor"), PROFILE(R.string.profile, CommunityMaterial.Icon.cmd_account, "me"), EVENTS(R.string.events, GoogleMaterial.Icon.gmd_event, "events/upcoming"), @@ -33,5 +33,4 @@ enum class FbTab(@StringRes val titleId: Int, val icon: IIcon, relativeUrl: Stri val url = "$FB_URL_BASE$relativeUrl" } -fun defaultTabs(): List<FbTab> = listOf(FbTab.FEED, FbTab.MESSAGES, FbTab.NOTIFICATIONS, FbTab.MENU) -fun defaultDrawers(): List<FbTab> = listOf(FbTab.ACTIVITY_LOG, FbTab.PAGES, FbTab.GROUPS, FbTab.SAVED)
\ No newline at end of file +fun defaultTabs(): List<FbTab> = listOf(FbTab.FEED, FbTab.MESSAGES, FbTab.NOTIFICATIONS, FbTab.MENU)
\ No newline at end of file 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 e3db5444..7bb73471 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt @@ -10,7 +10,7 @@ import com.pitchedapps.frost.utils.L * //TODO add folder mapping using Prefs */ enum class JsAssets : InjectorContract { - MENU, MENU_CLICK, CLICK_INTERCEPTOR, HEADER_BADGES + MENU, CLICK_A, CLICK_INTERCEPTOR, HEADER_BADGES ; var file = "${name.toLowerCase()}.min.js" diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt index d015e22e..a791363e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClient.kt @@ -65,7 +65,7 @@ open class FrostWebViewClient(val webCore: FrostWebViewCore) : WebViewClient() { L.d("Page finished reveal") webCore.jsInject(CssHider.HEADER, Prefs.themeInjector, - // JsAssets.CLICK_INTERCEPTOR, + JsAssets.CLICK_A, callback = { refreshObservable.onNext(false) }) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt index af13c459..5d44b580 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClientMenu.kt @@ -36,11 +36,11 @@ class FrostWebViewClientMenu(webCore: FrostWebViewCore) : FrostWebViewClient(web super.onPageFinished(view, url) if (url == webCore.baseUrl && content == null) { jsInject(JsAssets.MENU, callback = { - jsInject(JsAssets.MENU_CLICK) //menu injection must be after or we will have a loop from the click listener +// jsInject(JsAssets.CLICK_A) //menu injection must be after or we will have a loop from the click listener }) - } else if (url == contentBaseUrl) { - L.i("Inject content") - jsInject(JsAssets.MENU_CLICK) +// } else if (url == contentBaseUrl) { +// L.i("Inject content") +// jsInject(JsAssets.CLICK_A) } } |