changeset 174:7b34721d0d3d

Fix UI problems in Firefox 29+.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 07 Jun 2014 18:14:56 -0700
parents 300b70bbfc67
children 095fb39b2096
files vimperatorrc
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vimperatorrc	Wed Jun 04 15:39:30 2014 -0700
+++ b/vimperatorrc	Sat Jun 07 18:14:56 2014 -0700
@@ -43,11 +43,27 @@
 nnoremap <leader>b :downloads<cr>
 
 " Super minimal UI
-set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs
+"set toolbars=noaddons,nobookmarks,nomenu,nonavigation,notabs
 
 " Websites with useful keyboard shortcuts already
 ignorekeys add -except=:,J,K,b fastmail.fm
 ignorekeys add -except=:,J,K,b feedly.com
 ignorekeys add -except=:,J,K,b mnmlrdr.com
 
+" The new Firefox fucked up vimperator's ability to hide
+" things. Let's do it ourselves for now.
+map <silent> <F2> :js toggle_ui()<CR>
+
+:js << EOF
+function toggle_ui() {
+    var nb = document.getElementById('nav-bar');
+    nb.style.visibility = (nb.style.visibility == '') ? 'collapse' : '';
+    nb.style.overflow = (nb.style.height == '') ? '' : 'hidden';
+
+    var tb = document.getElementById('TabsToolbar');
+    tb.style.visibility = (tb.style.visibility == '') ? 'hidden' : '';
+    }
+toggle_ui();
+EOF
+
 " vim: ft=vim