Re: change commandline background color when focused
Hi.
Rodolfo Borges <rodolfo.borges@...> enlightened the world by
writing these words of wisdom:
> On Fri, Aug 15, 2008 at 10:08 AM, M. Terada <teramako@...> wrote:
> > The other way is that
> > write the below into .vimperatorrc
> >
> > javascript <<EOM
> > (function(){
> > var inputElm = document.getElementById('liberator-commandline-command');
> > function swapBGColor(event){
> > inputElm.parentNode.style.backgroundColor = event.type=="focus" ?
> > "yellow" : "";
> > }
> > inputElm.addEventListener('focus',swapBGColor,false);
> > inputElm.addEventListener('blur', swapBGColor,false);
> > })();
> > EOM
> >
> This works for me, thanks.
> And, vimperatorrc is a better place for this anyway.
Works nice for me too. Even better then the CSS version, which left the
space behind the leading `:' in the command line uncolored. I also like
having it in my vimperatorrc instead of some other plugin's config or
the userChrome.css.
Since I find this so useful, I was wondering if a similar thing was
possible to make pass-through mode more noticable - i.e. make the
commandline green. I'm not familiar with the vimperator source code, so
I have no idea if this would as easy as the solution above. Any
suggestions on what events one would have to take care of to do that?
Greetings,
Frank
--
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
"Just because I don't care doesn't mean I don't understand."
(Homer Simpson)
Hi.
Rodolfo Borges <rodolfo.borges@...> enlightened the world by
writing these words of wisdom:
> On Fri, Aug 15, 2008 at 10:08 AM, M. Terada <teramako@...> wrote:
> > The other way is that
> > write the below into .vimperatorrc
> >
> > javascript <<EOM
> > (function(){
> > var inputElm = document.getElementById('liberator-commandline-command');
> > function swapBGColor(event){
> > inputElm.parentNode.style.backgroundColor = event.type=="focus" ?
> > "yellow" : "";
> > }
> > inputElm.addEventListener('focus',swapBGColor,false);
> > inputElm.addEventListener('blur', swapBGColor,false);
> > })();
> > EOM
> >
> This works for me, thanks.
> And, vimperatorrc is a better place for this anyway.
Works nice for me too. Even better then the CSS version, which left the
space behind the leading `:' in the command line uncolored. I also like
having it in my vimperatorrc instead of some other plugin's config or
the userChrome.css.
Since I find this so useful, I was wondering if a similar thing was
possible to make pass-through mode more noticable - i.e. make the
commandline green. I'm not familiar with the vimperator source code, so
I have no idea if this would as easy as the solution above. Any
suggestions on what events one would have to take care of to do that?
Greetings,
Frank
--
--
Frank Blendinger | fb(at)intoxicatedmind.net | GPG: 0x0BF2FE7A
Fingerprint: BB64 F2B8 DFD8 BF90 0F2E 892B 72CF 7A41 0BF2 FE7A
"Just because I don't care doesn't mean I don't understand."
(Homer Simpson)