aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/menu.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js/menu.js')
-rw-r--r--app/src/main/assets/js/menu.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/app/src/main/assets/js/menu.js b/app/src/main/assets/js/menu.js
index 94261146..2c517ed2 100644
--- a/app/src/main/assets/js/menu.js
+++ b/app/src/main/assets/js/menu.js
@@ -1,35 +1,33 @@
var viewport = document.getElementById('viewport');
var root = document.getElementById('root');
-
var y = new MutationObserver(function(mutations) {
viewport.removeAttribute('style');
root.removeAttribute('style');
-})
-
+});
y.observe(viewport, {
attributes: true
});
-
y.observe(root, {
attributes: true
});
-
var x = new MutationObserver(function(mutations) {
- if (document.getElementsByClassName('mSideMenu').length) {
+ var menuChildren = document.getElementsByClassName('mSideMenu');
+ if (menuChildren.length > 0) {
x.disconnect();
console.log('Found side menu');
- var menu = document.getElementsByClassName('mSideMenu')[0];
+ var menu = menuChildren[0];
while (root.firstChild)
root.removeChild(root.firstChild);
while (menu.childNodes.length)
root.appendChild(menu.childNodes[0]);
+ Frost.emit(0);
setTimeout(function() {
y.disconnect();
console.log('Unhook styler');
- }, 500)
+ Frost.handleHtml(document.documentElement.outerHTML);
+ }, 500);
}
});
-
x.observe(document.getElementById('mJewelNav'), {
childList: true,
subtree: true