Extensions :  K-Meleon Forum
All about K-Meleon extensions. 
Fast Proxy Changer
Posted by: senna
Date: March 30, 2010 11:27PM

This is my first extension, and i am noob with macro language... but is working xD

How long do you spend seting a proxy? Yep mostly of us dont need change this, but sometimes is usefuly and find a good proxy server at a proxy list can b harder. So with this extension all u need is select the proxy, click and voilĂ  is done!

The proxy must b at "ip:port" format.

the basic code is

Proxy_Changer{
macroinfo=_("Muda o Proxy");

$iiip= $URLBAR;
$posicao = index($iiip, ":");
$porta = substr($iiip, ($posicao + 1));    
$proxyip = sub(":" . $porta, "", $iiip);       
alert("Proxy " .$proxyip . " at " . $porta . " port seted.");

setpref(INT, "network.proxy.type", 1);
setpref(STRING, "network.proxy.http", $proxyip); 
setpref(INT, "network.proxy.http_port", $porta);
}

Proxy_Desactive{
macroinfo=_("Muda o Proxy");
$proxiado = getpref(INT, "network.proxy.type");
if    ($proxiado == 0)
{
	setpref(INT, "network.proxy.type", 1);
	alert("proxy activated");
}
else
{
	setpref(INT, "network.proxy.type", 0);
	alert("proxy desactivated");
}

}

Proxy_Change_Selected{
macroinfo=_("Muda o Proxy");

$iiip= $SelectedText;
$posicao = index($iiip, ":");
$porta = substr($iiip, ($posicao + 1));    
$proxyip = sub(":" . $porta, "", $iiip);       
alert("Proxy " .$proxyip . " at " . $porta . " port seted.");

setpref(INT, "network.proxy.type", 1);
setpref(STRING, "network.proxy.http", $proxyip); 
setpref(INT, "network.proxy.http_port", $porta);
}


_Proxy_BuildMenu{
setmenu(Selection,macro,"Set Proxy", Proxy_Change_Selected);
}

Hey, submit better ideas for this code.



Edited 2 time(s). Last edit at 03/30/2010 11:30PM by senna.

Attachments: proxy.changer.rar (5.8 KB)  
Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: senna
Date: March 31, 2010 01:27AM

Hey, here a demo video to watch before try

http://www.youtube.com/watch?v=4oD2Y4VHCWY



Edited 1 time(s). Last edit at 03/31/2010 01:27AM by senna.

Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: disrupted
Date: March 31, 2010 04:11AM

this is outstanding..thank you senna

a while back some one asked for a way to view bbc iplayer outside the uk which naturally requires a proxy server and someway to easily change it when the proxy goes down or becomes unavailable, this will be particularly useful to use a gb proxy and test it for iplayer. tomorrow will be added to kmext under network

p.s love the bg music in the video

Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: panzer
Date: April 01, 2010 12:44AM

Our Senna is Brunno, not Ayrton. grinning smiley



Edited 1 time(s). Last edit at 04/01/2010 12:45AM by panzer.

Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: disrupted
Date: April 01, 2010 07:22AM

bruno is alright but aryton is my hero grinning smiley

Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: senna
Date: April 01, 2010 06:55PM

hehehe... Here in Brazil he was the greatest hero ever... Somekind of god xD



Edited 1 time(s). Last edit at 04/01/2010 08:46PM by senna.

Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: disrupted
Date: April 02, 2010 03:02AM

i think to many f1 fans all over the world he is a hero, the greatest f1 driver and i don't think any one will ever fill his shoes or drive like him especially in the wet.. a great man of strong faith who will never be forgotten

Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: Paul
Date: April 02, 2010 08:33AM

^^^^^^ Amen to that disrupted, I'll never forget that awful day sad smiley



Options: ReplyQuote
Re: Fast Proxy Changer
Posted by: Matt
Date: April 02, 2010 07:02PM

I'm really impressed. Great job; congrats, senna.

Quote
senna
This is my first extension, and i am noob with macro language... but is working xD

surprised smiley Congrats x10! We are waiting for your next extensions, because now there is no turning back drool smiley
Thanks!

Options: ReplyQuote


K-Meleon forum is powered by Phorum.