Development :  K-Meleon Forum
K-Meleon development related discussions. 
how to add an Advertisement button to the privacy bar?
Posted by: Juan Moises
Date: February 21, 2012 08:23PM

Hi,

big fan of K-Meleon's customization possibilities.

However, I want to include within the privacy bar a Block Advertisement button which I can't find anywhere in the toolbars.cfg code of the AuraAlpha(Large) skin. It seems odd, since all the privacy toggle options of the menu are included in it (except for the Block Flash option which you can disable by toggling JavaScript but which is no issue to me).

Am I missing something?

Thanks!

Options: ReplyQuote
Re: how to add an Advertisement button to the privacy bar?
Posted by: PokePeek
Date: February 22, 2012 07:35PM

You can try pasting the following code from siria's skin, with or without the extra comments, into the loction of your choice in your toolbars.cfg.

I changed the .bmp index number to zero because it doesn't seem to matter, the AuraAlpha(Large) privacy images are all identical! You can change the tooltip text in the third line ("Hide most Ad-Banners" etc.) to say anything you like.

I have no idea if this will work with your version as I'm not able to run it.

See skin for more info, such as flash options.



## AdBlock - HELP
## Ads are not really blocked, only hidden: always loaded, just not displayed if 'blocked' here.
## Press F2 -> Content Filters for more info on CSS-Ad-Blocking.
## Attention: This can never be perfect, and sometimes also hides 'good' images accidentally.
## The advertisement-definitions are in a text file, named "adblock.css" in the profile/chrome folder.
## To change it, open directly, or via menu: Edit -> Configuration -> AdBlocking Stylesheet
## To see the changes, toggle AdBlock on-off and reload page. No restart needed like with user-stylesheet.
## PS: Tons of ads are already blocked if javascript is off. See also Blacklist for popups, images etc.
## (own buttons), and to control all sorts of stuff: kb.mozillazine.org/Hostperm.1

AdBlock{
macros(KM_ToggleAdblock)|_Config_Appearance
Hide most Ad-Banners (could accidentally hide a 'good' image too). Right-click to modify detailed settings.
privhot.bmp[0]
privcold.bmp[0]
}




Edited 1 time(s). Last edit at 07/13/2013 04:29AM by desga2.

Options: ReplyQuote
Re: how to add an Advertisement button to the privacy bar?
Posted by: PokePeek
Date: February 22, 2012 07:39PM

(reposting fixed version here, sorry!)

You can try pasting the following code from siria's skin, with or without the extra comments, into the loction of your choice in your toolbars.cfg.

I changed the .bmp index number to zero because it doesn't seem to matter, the AuraAlpha(Large) privacy images are all identical! You can change the tooltip text in the third line ("Hide most Ad-Banners" etc.) to say anything you like.

I have no idea if this will work with your version as I'm not able to run it.

See skin for more info, such as flash options.



## AdBlock - HELP
## Ads are not really blocked, only hidden: always loaded, just not displayed if 'blocked' here.
## Press F2 -> Content Filters for more info on CSS-Ad-Blocking.
## Attention: This can never be perfect, and sometimes also hides 'good' images accidentally.
## The advertisement-definitions are in a text file, named "adblock.css" in the profile/chrome folder.
## To change it, open directly, or via menu: Edit -> Configuration -> AdBlocking Stylesheet
## To see the changes, toggle AdBlock on-off and reload page. No restart needed like with user-stylesheet.
## PS: Tons of ads are already blocked if javascript is off. See also Blacklist for popups, images etc.
## (own buttons), and to control all sorts of stuff: kb.mozillazine.org/Hostperm.1

AdBlock{
macros(KM_ToggleAdblock)|_Config_Appearance
Hide most Ad-Banners (could accidentally hide a 'good' image too). Right-click to modify detailed settings.
privhot.bmp[0]
privcold.bmp[0]
}

Options: ReplyQuote
Re: how to add an Advertisement button to the privacy bar?
Posted by: Juan Moises
Date: February 23, 2012 02:37AM

It worked!! now I can hide the menu bar again without worries, thx man, I really appreciate it!

Options: ReplyQuote
Re: how to add an Advertisement button to the privacy bar?
Posted by: PokePeek
Date: February 24, 2012 04:15PM

I'm glad I could help.

Take note of the vertical bar/pipe character "|" in the second line with the commands in it. It acts as a seperator between two commands applied to a single button, the one on the left applying to a standard click and the one on the right to a right-click or long-click. By adding the pipe followed by an appropriate command you can add or change right-click functionality for any button you see. For example, it's been popular to attach the whole privacy menu to the stop button by adding |&Privacy after the ID_NAV_STOP command.

	Stop{
	ID_NAV_STOP|&Privacy
	Stop loading this page
	toolhot.bmp[2]
	toolcold.bmp[2]
	tooldead.bmp[2]
	}

Since you like to hide the menu you should probably attach |&Privacy to a button of your choice.

See: http://kmeleon.sourceforge.net/forum/read.php?1,96463,97693#msg-97693

Options: ReplyQuote
Re: how to add an Advertisement button to the privacy bar?
Posted by: Juan Moises
Date: February 27, 2012 09:04PM

Excellent! That was exactly the kind of optimization I was looking for, thank you for taking the time, hope this will be useful for more people like me.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.