aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/menu_debug.coffee
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-10 14:25:29 -0500
committerGitHub <noreply@github.com>2017-12-10 14:25:29 -0500
commit1d4380cee77fc049a54d280a27dcefa3fa6ff1fd (patch)
tree6aa222b3f88862a46c8ffd0e46bfb94755d54729 /app/src/main/assets/js/menu_debug.coffee
parent30eb51a44a271512e27c97aecc02f3a339f572bf (diff)
downloadfrost-1d4380cee77fc049a54d280a27dcefa3fa6ff1fd.tar.gz
frost-1d4380cee77fc049a54d280a27dcefa3fa6ff1fd.tar.bz2
frost-1d4380cee77fc049a54d280a27dcefa3fa6ff1fd.zip
theme (#546)
* Update to coffee and use webstorm * Add chrome as well * Update all * Reinstall android 27
Diffstat (limited to 'app/src/main/assets/js/menu_debug.coffee')
-rw-r--r--app/src/main/assets/js/menu_debug.coffee42
1 files changed, 42 insertions, 0 deletions
diff --git a/app/src/main/assets/js/menu_debug.coffee b/app/src/main/assets/js/menu_debug.coffee
new file mode 100644
index 00000000..54b265f4
--- /dev/null
+++ b/app/src/main/assets/js/menu_debug.coffee
@@ -0,0 +1,42 @@
+# click menu and move contents to main view
+viewport = document.querySelector("#viewport")
+root = document.querySelector("#root")
+if !viewport
+ console.log "Menu.js: viewport is null"
+if !root
+ console.log "Menu.js: root is null"
+y = new MutationObserver((mutations) ->
+ viewport.removeAttribute "style"
+ root.removeAttribute "style"
+ return
+)
+y.observe viewport, attributes: true
+y.observe root, attributes: true
+x = new MutationObserver((mutations) ->
+ menu = document.querySelector(".mSideMenu")
+ if menu != null
+ x.disconnect()
+ console.log "Found side menu"
+ while root.firstChild
+ root.removeChild root.firstChild
+ while menu.childNodes.length
+ console.log "append"
+ viewport.appendChild menu.childNodes[0]
+ Frost?.handleHtml viewport.outerHTML
+ setTimeout (->
+ y.disconnect()
+ console.log "Unhook styler"
+ return
+ ), 500
+ return
+)
+jewel = document.querySelector("#mJewelNav")
+if !jewel
+ console.log "Menu.js: jewel is null"
+x.observe jewel,
+ childList: true
+ subtree: true
+menuA = document.querySelector("#bookmarks_jewel").querySelector("a")
+if !menuA
+ console.log "Menu.js: jewel is null"
+menuA.click()