aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-13 00:42:31 -0700
committerAllan Wang <me@allanwang.ca>2017-06-13 00:42:31 -0700
commite4377fed20ce1e3f4a0b236271eecdb1fe573b7a (patch)
treeaa0b14e328daa4ece41f65cfed5a4422f2c9e898 /app/src/main/assets
parenta7a37f8f5b1955f006a83d4713a2c6af500c28af (diff)
downloadfrost-e4377fed20ce1e3f4a0b236271eecdb1fe573b7a.tar.gz
frost-e4377fed20ce1e3f4a0b236271eecdb1fe573b7a.tar.bz2
frost-e4377fed20ce1e3f4a0b236271eecdb1fe573b7a.zip
Created js base for facebook menu
Diffstat (limited to 'app/src/main/assets')
-rw-r--r--app/src/main/assets/css/core/_base.scss (renamed from app/src/main/assets/core/_base.scss)0
-rw-r--r--app/src/main/assets/css/core/_colors.scss (renamed from app/src/main/assets/core/_colors.scss)0
-rw-r--r--app/src/main/assets/css/core/header.compact.css (renamed from app/src/main/assets/core/header.compact.css)0
-rw-r--r--app/src/main/assets/css/core/header.scss (renamed from app/src/main/assets/core/header.scss)0
-rw-r--r--app/src/main/assets/css/core/login.compact.css (renamed from app/src/main/assets/core/login.compact.css)0
-rw-r--r--app/src/main/assets/css/core/login.scss (renamed from app/src/main/assets/core/login.scss)0
-rw-r--r--app/src/main/assets/js/menu.js37
-rw-r--r--app/src/main/assets/js/menu.min.js1
8 files changed, 38 insertions, 0 deletions
diff --git a/app/src/main/assets/core/_base.scss b/app/src/main/assets/css/core/_base.scss
index 344b6696..344b6696 100644
--- a/app/src/main/assets/core/_base.scss
+++ b/app/src/main/assets/css/core/_base.scss
diff --git a/app/src/main/assets/core/_colors.scss b/app/src/main/assets/css/core/_colors.scss
index 718c1e62..718c1e62 100644
--- a/app/src/main/assets/core/_colors.scss
+++ b/app/src/main/assets/css/core/_colors.scss
diff --git a/app/src/main/assets/core/header.compact.css b/app/src/main/assets/css/core/header.compact.css
index 560a8465..560a8465 100644
--- a/app/src/main/assets/core/header.compact.css
+++ b/app/src/main/assets/css/core/header.compact.css
diff --git a/app/src/main/assets/core/header.scss b/app/src/main/assets/css/core/header.scss
index 4e4a2148..4e4a2148 100644
--- a/app/src/main/assets/core/header.scss
+++ b/app/src/main/assets/css/core/header.scss
diff --git a/app/src/main/assets/core/login.compact.css b/app/src/main/assets/css/core/login.compact.css
index 436b1875..436b1875 100644
--- a/app/src/main/assets/core/login.compact.css
+++ b/app/src/main/assets/css/core/login.compact.css
diff --git a/app/src/main/assets/core/login.scss b/app/src/main/assets/css/core/login.scss
index 00627838..00627838 100644
--- a/app/src/main/assets/core/login.scss
+++ b/app/src/main/assets/css/core/login.scss
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