Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
block referer macro
Posted by: PJ
Date: June 28, 2004 07:21PM

my first attempt anything on KM so bear with me if its been done before

#PUT in macros.cfg


$referer = "network.http.sendRefererHeader"


getpref(INT, $referer) ? pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(RefToggle), 1") : pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(RefToggle), 0");


RefToggle {
$tmp = (getpref(INT, $referer) ? 0 : 1);
setpref(INT, $referer, $tmp);
statusbar("Referer " . ($tmp ? "ALLOWED" : "BLOCKED"));
&buttonSync;
}


# PUT in toolbars.cfg


Referrer Blocker {
macros(RefToggle)
Block Referrer
privhot.bmp[0]
privcold.bmp[0]
privdead.bmp[0]
}

#I used the icon from the privacy bar but you can choose your own from the default skin or where ever.

my first go at this and checked it out using http://www.pcflank.com and it worked on there

PJ

Options: ReplyQuote
Re: block referer macro
Posted by: jsnj
Date: June 29, 2004 01:03AM

#PUT in macros.cfg

getpref(INT, $referer) ? pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(RefToggle), 1") : pluginmsg(toolbars, "CheckButton", "Tool Bar, macros(RefToggle), 0");



In the #TOGGLE BUTTON MACROS section within the buttonSync macro.

Options: ReplyQuote
Re: block referer macro
Posted by: guenter
Date: June 29, 2004 06:31AM

& thx & greetings You two!

Options: ReplyQuote
Re: block referer macro
Posted by: Sebastian
Date: June 29, 2004 08:11AM

well done

Options: ReplyQuote
Re: block referer macro
Posted by: PJ
Date: June 29, 2004 12:13PM

Thanks Guys ,
and thanks jsnj for making it clearer. yawning smiley)

pj

Options: ReplyQuote


K-Meleon forum is powered by Phorum.