From a095623d23e6d90233fc3d21e905f773b4c12a1b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Wed, 30 Aug 2017 13:35:38 -0400 Subject: Add debugging for menu (#242) * Add base for menu debugging * Add debug js --- app/src/main/kotlin/com/pitchedapps/frost/injectors/JsAssets.kt | 2 +- app/src/main/kotlin/com/pitchedapps/frost/settings/Debug.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'app/src/main/kotlin/com/pitchedapps') 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); -- cgit v1.2.3