aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/assets/js')
-rw-r--r--app/src/main/assets/js/menu.js37
-rw-r--r--app/src/main/assets/js/menu.min.js1
2 files changed, 38 insertions, 0 deletions
diff --git a/app/src/main/assets/js/menu.js b/app/src/main/assets/js/menu.js
new file mode 100644
index 00000000..94261146
--- /dev/null
+++ b/app/src/main/assets/js/menu.js
@@ -0,0 +1,37 @@
+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) {
+ x.disconnect();
+ console.log('Found side menu');
+ var menu = document.getElementsByClassName('mSideMenu')[0];
+ while (root.firstChild)
+ root.removeChild(root.firstChild);
+ while (menu.childNodes.length)
+ root.appendChild(menu.childNodes[0]);
+ setTimeout(function() {
+ y.disconnect();
+ console.log('Unhook styler');
+ }, 500)
+ }
+});
+
+x.observe(document.getElementById('mJewelNav'), {
+ childList: true,
+ subtree: true
+});
+document.getElementById('bookmarks_jewel').getElementsByTagName('a')[0].click();
diff --git a/app/src/main/assets/js/menu.min.js b/app/src/main/assets/js/menu.min.js
new file mode 100644
index 00000000..6943e2a5
--- /dev/null
+++ b/app/src/main/assets/js/menu.min.js
@@ -0,0 +1 @@
+var viewport=document.getElementById("viewport");var root=document.getElementById("root");var y=new MutationObserver(function(a){viewport.removeAttribute("style");root.removeAttribute("style")});y.observe(viewport,{attributes:true});y.observe(root,{attributes:true});var x=new MutationObserver(function(a){if(document.getElementsByClassName("mSideMenu").length){x.disconnect();console.log("Found side menu");var b=document.getElementsByClassName("mSideMenu")[0];while(root.firstChild){root.removeChild(root.firstChild)}while(b.childNodes.length){root.appendChild(b.childNodes[0])}setTimeout(function(){y.disconnect();console.log("Unhook styler")},500)}});x.observe(document.getElementById("mJewelNav"),{childList:true,subtree:true});document.getElementById("bookmarks_jewel").getElementsByTagName("a")[0].click(); \ No newline at end of file