Setting preferences in vimperator
December 16, 2010 at 2:57 pm Leave a comment
I found out recently that vimperator has builtin commands to set preferences from its command line.
So, for example:
set! network.proxy.http = ‘myproxy.com’
followed by
set! network.proxy.type = 1
will switch on an existing http proxy.
Things are slightly different if you want to do things from javascript addons. Here you need to use the XPCOM interfaces. The following javascript code adds a noproxy command to clear your proxy settings.
js <<EOF
commands.addUserCommand(['noproxy'],
'Switch off proxy',
function (args) {
pref.setIntPref('network.proxy.type', 0);
},
{},
true
);
EOF
Entry filed under: Uncategorized. Tags: firefox settings, mozilla, proxy, Vimperator.
Trackback this post | Subscribe to the comments via RSS Feed