Skip to content

Commit

Permalink
Small UI tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Oct 12, 2014
1 parent 106c44d commit 6ca7988
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 74 deletions.
32 changes: 16 additions & 16 deletions Chrome/fixed_navbar.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#scrollbarHider {
overflow: hidden;
top: 95px;
bottom: 0px;
position: fixed;
margin-left: -20px;
margin-top: 12px;
margin-bottom: -12px;
width: 181px;
overflow: hidden;
top: 95px;
bottom: 0px;
position: fixed;
margin-left: -20px;
margin-top: 12px;
margin-bottom: -12px;
width: 201px;
}

#navigationWrapper {
overflow: auto;
height: 100%;
padding-right: 5000px;
padding-left: 20px;
width: 181px;
position: absolute;
top: -12px;
overflow: auto;
height: 100%;
padding-left: 20px;
width: 181px;
position: absolute;
top: -12px;
padding-right: 5000px;
}

#leftColWrapper {
position: fixed;
position: fixed;
}
34 changes: 17 additions & 17 deletions Chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name":"FB fixed navbar",
"description":"Freezes left navigation pane on Facebook",
"version":"1.0.0",
"manifest_version":2,
"author": "Philipp Schirmer",
"icons": {
"128": "icons/icon128.png",
"48": "icons/icon48.png"
},
"content_scripts": [
{
"matches": ["*://www.facebook.com/*"],
"css": ["fixed_navbar.css"],
"js": ["fixed_navbar.js"],
"run_at": "document_end"
}
]
"name":"FB fixed navbar",
"description":"Freezes left navigation pane on Facebook",
"version":"1.0.1",
"manifest_version":2,
"author": "Philipp Schirmer",
"icons": {
"128": "icons/icon128.png",
"48": "icons/icon48.png"
},
"content_scripts": [
{
"matches": ["*://www.facebook.com/*"],
"css": ["fixed_navbar.css"],
"js": ["fixed_navbar.js"],
"run_at": "document_end"
}
]
}
32 changes: 16 additions & 16 deletions Firefox/data/fixed_navbar.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#scrollbarHider {
overflow: hidden;
top: 95px;
bottom: 0px;
position: fixed;
margin-left: -20px;
margin-top: 12px;
margin-bottom: -12px;
width: 181px;
overflow: hidden;
top: 95px;
bottom: 0px;
position: fixed;
margin-left: -20px;
margin-top: 12px;
margin-bottom: -12px;
width: 201px;
}

#navigationWrapper {
overflow: auto;
height: 100%;
padding-right: 5000px;
padding-left: 20px;
width: 181px;
position: absolute;
top: -12px;
overflow: auto;
height: 100%;
padding-left: 20px;
width: 181px;
position: absolute;
top: -12px;
padding-right: 5000px;
}

#leftColWrapper {
position: fixed;
position: fixed;
}
50 changes: 31 additions & 19 deletions Firefox/data/fixed_navbar.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
setInterval(fixNavbar, 50);
window.addEventListener('resize', handleResize);

function handleResize() {
var scrollbarHider = document.getElementById('scrollbarHider');
if (scrollbarHider !== null) {
scrollbarHider.style.display = 'none';
setTimeout(function() {
scrollbarHider.style.display = 'block'
}, 20);
}
}

function fixNavbar() {
var pagelet_navigation = document.getElementById('pagelet_navigation');
if (document.getElementById('leftColWrapper') === null && pagelet_navigation !== null) {
var mainContainer = document.getElementById('mainContainer');
var leftCol = document.getElementById('leftCol');
var contentCol = document.getElementById('contentCol');
var leftColWrapper = document.createElement('div');
var scrollbarHider = document.createElement('div');
var navigationWrapper = document.createElement('div');
leftColWrapper.id = 'leftColWrapper';
scrollbarHider.id = 'scrollbarHider';
navigationWrapper.id = 'navigationWrapper';
mainContainer
.appendChild(leftColWrapper)
.appendChild(leftCol)
.appendChild(scrollbarHider)
.appendChild(navigationWrapper)
.appendChild(pagelet_navigation);
mainContainer.appendChild(contentCol);
}
var pagelet_navigation = document.getElementById('pagelet_navigation');
if (document.getElementById('leftColWrapper') === null && pagelet_navigation !== null) {
var mainContainer = document.getElementById('mainContainer');
var leftCol = document.getElementById('leftCol');
var contentCol = document.getElementById('contentCol');
var leftColWrapper = document.createElement('div');
var scrollbarHider = document.createElement('div');
var navigationWrapper = document.createElement('div');
leftColWrapper.id = 'leftColWrapper';
scrollbarHider.id = 'scrollbarHider';
navigationWrapper.id = 'navigationWrapper';
mainContainer
.appendChild(leftColWrapper)
.appendChild(leftCol)
.appendChild(scrollbarHider)
.appendChild(navigationWrapper)
.appendChild(pagelet_navigation);
mainContainer.appendChild(contentCol);
}
}
2 changes: 1 addition & 1 deletion Firefox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"description": "Freezes left navigation pane on Facebook",
"author": "Philipp Schirmer",
"license": "MPL 2.0",
"version": "1.0.0"
"version": "1.0.1"
}
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,26 @@ This tiny extensions freezes the left navigation pane on Facebook so that it is
Chrome
------

Download at [Chrome Web Store](https://chrome.google.com/webstore/detail/hijonlkmghfbdpcmbimegkoogkfpckkl)
Download [.crx](https://github.com/philipp94831/FB-fixed-navbar/releases/download/v1.0.0/FB-fixed-navbar.crx)
Download at [Chrome Web Store](https://chrome.google.com/webstore/detail/hijonlkmghfbdpcmbimegkoogkfpckkl)
Download [.crx](https://github.com/philipp94831/FB-fixed-navbar/releases/download/v1.0.1/FB-fixed-navbar.crx)

Firefox
-------

Download at [Add-ons for Firefox](https://addons.mozilla.org/addon/fb-fixed-navbar/)
Download [.xpi](https://github.com/philipp94831/FB-fixed-navbar/releases/download/v1.0.0/FB-fixed-navbar.xpi)
Download at [Add-ons for Firefox](https://addons.mozilla.org/addon/fb-fixed-navbar/)
Download [.xpi](https://github.com/philipp94831/FB-fixed-navbar/releases/download/v1.0.1/FB-fixed-navbar.xpi)

For help, see our [FAQ](https://github.com/philipp94831/FB-fixed-navbar/wiki/FAQ)
For help, see our [FAQ](https://github.com/philipp94831/FB-fixed-navbar/wiki/FAQ)
Found a Bug? [File it!](https://github.com/philipp94831/FB-fixed-navbar/issues)

===

[Changelog:](https://github.com/philipp94831/FB-fixed-navbar/releases)

[1.0.1:](https://github.com/philipp94831/FB-fixed-navbar/releases/tag/v1.0.1)

- Small UI tweaks

[1.0.0:](https://github.com/philipp94831/FB-fixed-navbar/releases/tag/v1.0.0)

- Firefox & Chrome version
Expand Down

0 comments on commit 6ca7988

Please sign in to comment.