aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-30 13:35:38 -0400
committerGitHub <noreply@github.com>2017-08-30 13:35:38 -0400
commita095623d23e6d90233fc3d21e905f773b4c12a1b (patch)
tree02adb88de4c88d2a03ee4efddc9683616450bf4a /app/src/main/kotlin/com
parent270ff7705be5ec0c78f5eae4934779ff4b4c00ee (diff)
downloadfrost-a095623d23e6d90233fc3d21e905f773b4c12a1b.tar.gz
frost-a095623d23e6d90233fc3d21e905f773b4c12a1b.tar.bz2
frost-a095623d23e6d90233fc3d21e905f773b4c12a1b.zip
Add debugging for menu (#242)
* Add base for menu debugging * Add debug js
Diffstat (limited to 'app/src/main/kotlin/com')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt2
2 files changed, 3 insertions, 1 deletions
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 27b0f92a..b4ce05a5 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt
@@ -11,7 +11,7 @@ import java.util.*
* The enum name must match the css file name
*/
enum class JsAssets : InjectorContract {
- MENU, CLICK_A, CONTEXT_A, HEADER_BADGES, SEARCH, TEXTAREA_LISTENER, NOTIF_MSG
+ MENU, MENU_DEBUG, CLICK_A, CONTEXT_A, HEADER_BADGES, SEARCH, TEXTAREA_LISTENER, NOTIF_MSG
;
var file = "${name.toLowerCase(Locale.CANADA)}.min.js"
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt
index f8dc81d1..3375a444 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt
@@ -14,6 +14,7 @@ import com.pitchedapps.frost.facebook.FbItem
import com.pitchedapps.frost.facebook.USER_AGENT_BASIC
import com.pitchedapps.frost.injectors.InjectorContract
import com.pitchedapps.frost.injectors.JsActions
+import com.pitchedapps.frost.injectors.JsAssets
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.utils.cleanHtml
import com.pitchedapps.frost.utils.materialDialogThemed
@@ -49,6 +50,7 @@ fun SettingsActivity.getDebugPrefs(): KPrefAdapterBuilder.() -> Unit = {
}
private enum class Debugger(val data: FbItem, val injector: InjectorContract?, vararg query: String) {
+ MENU(FbItem.MENU, JsAssets.MENU_DEBUG, "#viewport"), //todo modify menu js for debugging
NOTIFICATIONS(FbItem.NOTIFICATIONS, null, "#notifications_list"),
SEARCH(FbItem.SEARCH, JsActions.FETCH_BODY);