diff options
author | Allan Wang <me@allanwang.ca> | 2019-05-01 16:05:19 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-05-01 16:05:19 -0700 |
commit | 58f4f9298b09081b3c937227828824849057a835 (patch) | |
tree | 18d2bf44637b52c9f68817253fc37d4ca699daef /app/src/web/assets/js/menu.js | |
parent | 576cc1a451a16f2d82ee1e41e83c420a85ded47e (diff) | |
parent | da93672c2ed6b54e0e7119a6b55715185112df3e (diff) | |
download | frost-58f4f9298b09081b3c937227828824849057a835.tar.gz frost-58f4f9298b09081b3c937227828824849057a835.tar.bz2 frost-58f4f9298b09081b3c937227828824849057a835.zip |
Merge dev
Diffstat (limited to 'app/src/web/assets/js/menu.js')
-rw-r--r-- | app/src/web/assets/js/menu.js | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/app/src/web/assets/js/menu.js b/app/src/web/assets/js/menu.js deleted file mode 100644 index b6a30209..00000000 --- a/app/src/web/assets/js/menu.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -(function () { - var viewport = document.querySelector("#viewport"); - var root = document.querySelector("#root"); - var bookmarkJewel = document.querySelector("#bookmarks_jewel"); - if (!viewport || !root || !bookmarkJewel) { - console.log('Menu.js: main elements not found'); - Frost.emit(0); - return; - } - var menuA = bookmarkJewel.querySelector("a"); - if (!menuA) { - console.log('Menu.js: menu links not found'); - Frost.emit(0); - return; - } - var jewel = document.querySelector('#mJewelNav'); - if (!jewel) { - console.log('Menu.js: jewel is null'); - return; - } - var y = new MutationObserver(function () { - viewport.removeAttribute('style'); - root.removeAttribute('style'); - }); - y.observe(viewport, { - attributes: true - }); - y.observe(root, { - attributes: true - }); - var x = new MutationObserver(function () { - var menu = document.querySelector('.mSideMenu'); - if (menu) { - x.disconnect(); - console.log("Found side menu"); - while (root.firstChild) { - root.removeChild(root.firstChild); - } - while (menu.childNodes.length) { - viewport.appendChild(menu.childNodes[0]); - } - Frost.emit(0); - setTimeout(function () { - y.disconnect(); - console.log('Unhook styler'); - }, 500); - } - }); - x.observe(jewel, { - childList: true, - subtree: true - }); - menuA.click(); -}).call(undefined); |