<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mikes Musings &#187; Mike Kaply</title>
	<atom:link href="http://mike.kaply.com/author/mkaply/feed/" rel="self" type="application/rss+xml" />
	<link>http://mike.kaply.com</link>
	<description>Mozilla, money, microformats and more</description>
	<lastBuildDate>Mon, 14 May 2012 15:29:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How My Site Was Hacked</title>
		<link>http://mike.kaply.com/2012/05/14/how-my-site-was-hacked/</link>
		<comments>http://mike.kaply.com/2012/05/14/how-my-site-was-hacked/#comments</comments>
		<pubDate>Mon, 14 May 2012 15:22:26 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[more]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1605</guid>
		<description><![CDATA[So in case anybody cares, what happened was that I apparently have a theme that got hacked. It appears to be a theme called super blogger had a helper.php file in it&#8217;s images directory which allowed files to be posted into that directory. Using that uploaded file, extra code was added to my functions.php file [...]]]></description>
			<content:encoded><![CDATA[<p>
So in case anybody cares, what happened was that I apparently have a theme that got hacked. It appears to be a theme called super blogger had a helper.php file in it&#8217;s images directory which allowed files to be posted into that directory.
</p>
<p>
Using that uploaded file, extra code was added to my functions.php file in my standard theme which opened a backdoor and gave free reign.
</p>
<p>
Many thanks to <a href="http://twitter.com/agmckee">Alex McKee</a> who helped me track things down.
</p>
<p>
I recommend reading <a href="http://davemeehan.com/technology/wordpress-install-hacked-again-with-page_options-function-and-references-to-kadaffizzet-com">this post from Dave Meehan</a> for more detail.
</p>
<p>
FYI, a couple things that should have clued me in (which I&#8217;ll look for in the future). First, I started getting an error on my admin console about extra data sent before the headers. I stupidly went into functions.php and fixed it (even working with 8Bit support) without noticing the added code. Second, in the source to my pages, there was a misspelled &#8220;Wordpres Counter.&#8221; That should have clued me in as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/05/14/how-my-site-was-hacked/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Site Was Hacked</title>
		<link>http://mike.kaply.com/2012/05/13/my-site-was-hacked/</link>
		<comments>http://mike.kaply.com/2012/05/13/my-site-was-hacked/#comments</comments>
		<pubDate>Mon, 14 May 2012 00:12:30 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[more]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1603</guid>
		<description><![CDATA[My WordPress site was hacked and apparently over the past couple days there was an embedded iframe that was causing a virus to be sent down. I did not totally determine what happened, but I&#8217;m continuing to investigate. I removed some bad code I saw. Please make sure you use antivirus and your definition are [...]]]></description>
			<content:encoded><![CDATA[<p>
My WordPress site was hacked and apparently over the past couple days there was an embedded iframe that was causing a virus to be sent down. I did not totally determine what happened, but I&#8217;m continuing to investigate. I removed some bad code I saw.
</p>
<p>
Please make sure you use antivirus and your definition are current. If you do get a warning on any page, please let me know so I can investigate.
</p>
<p>
Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/05/13/my-site-was-hacked/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Customizing Firefox &#8211; Hiding Private Browsing</title>
		<link>http://mike.kaply.com/2012/05/11/customizing-firefox-hiding-private-browsing/</link>
		<comments>http://mike.kaply.com/2012/05/11/customizing-firefox-hiding-private-browsing/#comments</comments>
		<pubDate>Fri, 11 May 2012 18:27:25 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1589</guid>
		<description><![CDATA[Update: I was reminded that using visibility: collapse for menu items leaves them in the key navigation. Instead, you should use hidden=&#8221;true&#8221; or in places that doesn't work (context menus) display: none. In my previous post, I showed how to setup a basic extension in Firefox. Having this extension will allow us to do some [...]]]></description>
			<content:encoded><![CDATA[<p>
<strong>Update:</strong> I was reminded that using <tt>visibility: collapse</tt> for menu items leaves them in the key navigation. Instead, you should use <t>hidden=&#8221;true&#8221;</tt> or in places that doesn't work (context menus) <tt>display: none</tt>.
</p>
<p>
In my <a href="http://mike.kaply.com/2012/05/10/customizing-firefox-extensions/">previous post</a>, I showed how to setup a basic extension in Firefox. Having this extension will allow us to do some Firefox customization. Before I get into this post, though, I wanted to clarify one thing. I had you put your XUL overlay in the root directory and point your content directory to <tt>./</tt>. I did that to make things simpler but in practice you'll want to separate your files. The structure most commonly used is a <tt>chrome</tt> directory with a <tt>content</tt> subdirectory underneath. In that case, the directory in the chrome manifest would be <tt>chrome/content/</tt>.
</p>
<p>
With that out of the way, let's customize Firefox. We're going to prevent a user from accessing private browsing. We need a disclaimer here, though. We are not removing private browsing, we are just removing access. So if the user has an add-on that invokes private browsing, or if they have access to about:config, they can still turn on private browsing. For any of these customizations, there's an expectation that the right things have been done to prevent the user from accessing functionality via other means.
</p>
<p><span id="more-1589"></span></p>
<p>
The first step to removing functionality from the browser is to understand the different ways a user can access that function. For private browsing, there are three entry points, the <strong>Start Private Browsing</strong> menu item on the Firefox button, the <strong>Start Private Browsing</strong> menu item under the Tools menu and the keystroke Ctrl+Shift+P (command+shift+P on Mac). We'll need to handle each of these cases and prevent the user from accessing them.
</p>
<p>
In my previous post, I said that we needed the ID of an item in order to customize it. There are two ways to find the ID. One is to use the <a href="https://addons.mozilla.org/firefox/addon/dom-inspector-6622/">DOM Inspector</a> and the other is to search through the Mozilla source code. I prefer to search through the <a href="http://mxr.mozilla.org/">Mozilla source code</a> because it usually gives me a lot more information. Here's how I locate what I need.
</p>
<p>
The <a href="http://mxr.mozilla.org/">Mozilla source code is hosted in a tool called MXR</a> and can be easily searched. The first thing you want to search on is the text of the menuitem you're trying to remove. So we'll <a href="http://mxr.mozilla.org/mozilla-central/search?string=Start+Private+browsing">search on Start Private Browsing</a>. What we're looking for usually is a DTD file that has the same text as the menu item. This will help us find the actual menu item. In this case, that file is <a href="http://mxr.mozilla.org/mozilla-central/source/browser/locales/en-US/chrome/browser/browser.dtd#287">browser.dtd</a>:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;!ENTITY privateBrowsingCmd.start.label &quot;Start Private Browsing&quot;&gt;
</pre>
<p>The information we actually need is the label on the left. By using that as a search term, we can find the menus that have this as their text. So we <a href="http://mxr.mozilla.org/mozilla-central/search?string=privateBrowsingCmd.start.label">search for privateBrowsingCmd.start.label</a>. This looks a lot more promising. We see references to <tt>browser-appmenu.inc</tt> and <tt>browser-menubar.inc</tt>. These files contain the menu items we're looking for. So let's look at one of those menuitems:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;menuitem id=&quot;appmenu_privateBrowsing&quot;
          class=&quot;menuitem-iconic menuitem-iconic-tooltip&quot;
          label=&quot;&amp;privateBrowsingCmd.start.label;&quot;
          startlabel=&quot;&amp;privateBrowsingCmd.start.label;&quot;
          stoplabel=&quot;&amp;privateBrowsingCmd.stop.label;&quot;
          command=&quot;Tools:PrivateBrowsing&quot;
          key=&quot;key_privatebrowsing&quot;/&gt;
</pre>
<p>There is one of the IDs we need - <tt>appmenu_privateBrowsing</tt>.
</p>
<p>
So if we add this to our XUL overlay:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;menuitem id=&quot;appmenu_privateBrowsing&quot;
          hidden=&quot;true&quot;/&gt;
</pre>
<p>It will hide the menu item on the Firefox button.
</p>
<p>
If we look further at this menu item, though, it will give some more interesting information. In particular it tells us that when this menu item is invoked, it calls a command - <tt>Tools:PrivateBrowsing</tt>. What if instead of hiding each menuitem, we could simply disable that command? It just so happens that you can do exactly that.
</p>
<p>
<a href="https://developer.mozilla.org/en/XUL/command">Commands</a> are XUL elements for invoking operations from multiple sources. Because command is a XUL element, we can override it just like any other element. So let's find this element by <a href="http://mxr.mozilla.org/mozilla-central/search?string=Tools:PrivateBrowsing">searching the source code</a>. In <a href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-sets.inc#139">browser-sets.inc</a>, we find this:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;command id=&quot;Tools:PrivateBrowsing&quot;
         oncommand=&quot;gPrivateBrowsingUI.toggleMode();&quot;/&gt;
</pre>
<p>So we can prevent access to private browsing by simply overriding the oncommand:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;command id=&quot;Tools:PrivateBrowsing&quot;
         oncommand=&quot;&quot;/&gt;
</pre>
<p>or we can even display a message when private browsing is invoked:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;command id=&quot;Tools:PrivateBrowsing&quot;
         oncommand=&quot;alert('Private browsing has been disabled by your administrator.')&quot;/&gt;
</pre>
<p>By changing the command, we can prevent the various menuitems and keystrokes from invoking private browsing at all. This keeps us from having to worry about disabling the keystroke. If you do run into a case where disabling the command is not enough, search for the key value in the file <a href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-sets.inc">browser-sets.inc</a>. Usually it's just a matter of setting the command on the keystroke to nothing:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;key id=&quot;key_privatebrowsing&quot; command=&quot;&quot;/&gt;
</pre>
<p>Occasionally keys use <tt>oncommand</tt>, so you'll need to set that to nothing instead.
</p>
<p>
There's still one more menu item, though, so let's go back to our first search and take a look at <a href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-menubar.inc#601">browser-menubar.inc</a>.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;menuitem id=&quot;privateBrowsingItem&quot;
          label=&quot;&amp;privateBrowsingCmd.start.label;&quot;
          accesskey=&quot;&amp;privateBrowsingCmd.start.accesskey;&quot;
          startlabel=&quot;&amp;privateBrowsingCmd.start.label;&quot;
          startaccesskey=&quot;&amp;privateBrowsingCmd.start.accesskey;&quot;
          stoplabel=&quot;&amp;privateBrowsingCmd.stop.label;&quot;
          stopaccesskey=&quot;&amp;privateBrowsingCmd.stop.accesskey;&quot;
          key=&quot;key_privatebrowsing&quot;
          command=&quot;Tools:PrivateBrowsing&quot;/&gt;
</pre>
<p>All we need from here is the id. So let's add that to our XUL overlay:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;menuitem id=&quot;privateBrowsingItem&quot;
          hidden=&quot;true&quot;/&gt;
</pre>
<p>And there you have it. You've disabled access to private browsing.
</p>
<p>
Using this process, you can find and customize or disable just about any menuitem in Firefox.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/05/11/customizing-firefox-hiding-private-browsing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customizing Firefox &#8211; Extensions</title>
		<link>http://mike.kaply.com/2012/05/10/customizing-firefox-extensions/</link>
		<comments>http://mike.kaply.com/2012/05/10/customizing-firefox-extensions/#comments</comments>
		<pubDate>Thu, 10 May 2012 13:36:58 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1564</guid>
		<description><![CDATA[I&#8217;ve decided I&#8217;m going to expand on my earlier post about customizing Firefox with extensions. A lot of the things people have asked for recently can only be accomplished with extensions, so I want to try to give people a very basic handle on creating extensions so I can then give sample code of the [...]]]></description>
			<content:encoded><![CDATA[<p>
I&#8217;ve decided I&#8217;m going to expand on my earlier post about customizing Firefox with extensions. A lot of the things people have asked for recently can only be accomplished with extensions, so I want to try to give people a very basic handle on creating extensions so I can then give sample code of the specific things people are trying to do.
</p>
<p>
My goal here is NOT to teach people how to build extensions. You can find that information on <a href="https://addons.mozilla.org/en-US/developers/">AMO</a> or <a href="https://developer.mozilla.org/en/Extensions">MDN</a>. My goal is give people a very basic understanding of how one particular type of extension works so I can produce simple code snippets you can drop in and use for your Firefox distribution. If you need anything more complex, you&#8217;re going to have to hire me.
</p>
<p><span id="more-1564"></span></p>
<p>
For the purposes of this discussion, we are only going to focus on extensions hosted in the <a href="http://mike.kaply.com/2012/02/09/integrating-add-ons-into-firefox/">distribution/bundles</a> directory. The reason is simple &#8211; these add-ons do not require any infrastructure like <a href="https://developer.mozilla.org/en/Install.rdf">install.rdf</a> or icons. They can consist of only two files, a chrome manifest and a XUL overlay.
</p>
<p>
Step one is to create a directory for our extension under the <tt>distribution/bundles</tt> directory where Firefox is installed. You might have to create the distribution directory as well. The directory you create can have any name &#8211; it does not have to be the ID of the extension or anything like that. In the new directory, we&#8217;re going to create a file called <tt>chrome.manifest</tt>.
</p>
<p>
The chrome manifest describes an extension to Firefox or any other Mozilla based product. If you want lots of detail, you can read it on <a href="https://developer.mozilla.org/en/Chrome_Registration">MDN</a>. A minimal chrome manifest only needs two lines:</p>
<pre class="brush: plain; title: ; notranslate">
content myextension ./
overlay chrome://browser/content/browser.xul chrome://myextension/content/browseroverlay.xul
</pre>
<p>
The first line tells Firefox where to find the content of the extension (in the same directory) and the second line tells Firefox to overlay the main browser window with our file, <tt>browseroverlay.xul</tt>. In later posts, I&#8217;ll show you how to overlay different windows and dialogs.
</p>
<p>
<tt>myextension</tt> should be changed to something unique for your extension. It can clash with other extensions that are installed.
</p>
<p>
Next up is the XUL overlay. XUL is an XML based language used for the UI of Firefox. You can read more about it on <a href="https://developer.mozilla.org/en/XUL">MDN</a>. <a href="https://developer.mozilla.org/en/XUL_Overlays">XUL overlays</a> allows us to change the user interface of Firefox by replacing and changing the attributes of existing user interface elements. A basic XUL overlay looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;overlay xmlns=&quot;http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul&quot;
         xmlns:html=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;/overlay&gt;
</pre>
</p>
<p>
Once we&#8217;ve created these two files, we can just add code into the overlay to tweak the browser. For instance, I had a request to block the context menu on the bookmarks toolbar. To do that, you add this code to the overlay (between the two overlay tags):</p>
<pre class="brush: plain; title: ; notranslate">
&lt;toolbar id=&quot;PersonalToolbar&quot; oncontextmenu=&quot;event.preventDefault();&quot;/&gt;
</pre>
<p>You may wonder how I figured that out. We&#8217;ll talk about it in our later posts. For now, just know you have the basics on how to customize the Firefox UI with an extension.
</p>
<p>
Again, my plan with this post is not to go into detail about how to do specific things. It&#8217;s just to give you a basic understanding of how to change the Firefox user interface.
</p>
<p>
In the next few posts, I&#8217;ll show you how to make specific tweaks to Firefox by either modifying this overlay or overlaying other windows within Firefox.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/05/10/customizing-firefox-extensions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adding a Pinterest Image Without Impacting Your Page Design</title>
		<link>http://mike.kaply.com/2012/05/01/adding-a-pinterest-image-without-impacting-your-page-design/</link>
		<comments>http://mike.kaply.com/2012/05/01/adding-a-pinterest-image-without-impacting-your-page-design/#comments</comments>
		<pubDate>Tue, 01 May 2012 14:18:47 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[more]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1558</guid>
		<description><![CDATA[Recently I had to modify a page to work with Pinterest. The problem was that all the images on the page were either CSS background images or had a height or width of less than 80 pixels. In those cases, the Pin It bookmarklet simply ignores the images. So the question I had was how [...]]]></description>
			<content:encoded><![CDATA[<p>
Recently I had to modify a page to work with <a href="http://pinterest.com/">Pinterest</a>. The problem was that all the images on the page were either CSS background images or had a height or width of less than 80 pixels. In those cases, the <a href="http://pinterest.com/about/goodies/">Pin It bookmarklet</a> simply ignores the images. So the question I had was how to make a page Pinterest friendly without impacting the design.
</p>
<p><span id="more-1558"></span></p>
<p>
I wanted to add a brand new image, but I didn&#8217;t want it to be visible on the page at all. So first I tried the obvious &#8211; use CSS to hide the image. The bookmarklet was too smart for me. If an image is hidden via CSS, it won&#8217;t be found. Then I tried setting the height and width to 0 via CSS. This didn&#8217;t work because the images were less than 80&#215;80. The Pinterest bookmarklet honors the height and width specified via CSS.
</p>
<p>
In the end, I came up with a solution using opacity:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;img style=&quot;opacity: 0;position: absolute;top:0; left:0&quot;
     src=&quot;image_for_pinterest.jpg&quot;&gt;
</pre>
<p>Pinterest picks up this image and it does not display on the page or affect page layout.</p>
<p>
This method can also be used if you want a specific image to be the first image Pinterest finds.
</p>
<p>
If you want to see this in action, check out the <a href="http://brandthunder.com/personas/mlb/">MLB.com Personas Interactive page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/05/01/adding-a-pinterest-image-without-impacting-your-page-design/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ars Technica Article on Browsers for Business</title>
		<link>http://mike.kaply.com/2012/04/26/ars-technica-article-on-browsers-for-business/</link>
		<comments>http://mike.kaply.com/2012/04/26/ars-technica-article-on-browsers-for-business/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 17:53:43 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1551</guid>
		<description><![CDATA[This article on Ars Technica seemed to fly under the radar, so I wanted to make sure people saw it. Ars browser shootout: which Web browser is best for business? I was interviewed for the article. You can see my comments on page 4.]]></description>
			<content:encoded><![CDATA[<p>
This article on Ars Technica seemed to fly under the radar, so I wanted to make sure people saw it.
</p>
<p>
<a href="http://arstechnica.com/business/reviews/2012/04/smb-browser-shootout.ars">Ars browser shootout: which Web browser is best for business?</a>
</p>
<p>
I was interviewed for the article. You can see my comments on page 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/04/26/ars-technica-article-on-browsers-for-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing Firefox &#8211; Extensions and the CCK Wizard</title>
		<link>http://mike.kaply.com/2012/04/13/customizing-firefox-extensions-and-the-cck-wizard/</link>
		<comments>http://mike.kaply.com/2012/04/13/customizing-firefox-extensions-and-the-cck-wizard/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 14:19:36 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1541</guid>
		<description><![CDATA[I&#8217;ve saved the most powerful method of customizing Firefox for last &#8211; writing an extension. Firefox extensions allow you to customize just about every aspect of Firefox. You can override default behaviors, customize the user interface, change and lock default preferences, even replace entire components. I&#8217;ve found that when most people think of extensions, they [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://addons.mozilla.org/firefox/addon/cck/?src=blog"><img src="http://mike.kaply.com/files/2012/04/cckwizard.jpg" alt="" title="cckwizard" width="319" height="208" class="alignleft size-full wp-image-1546" /></a>
<p>
I&#8217;ve saved the most powerful method of customizing Firefox for last &#8211; writing an extension. Firefox extensions allow you to customize just about every aspect of Firefox. You can override default behaviors, customize the user interface, change and lock default preferences, even replace entire components.
</p>
<p><span id="more-1541"></span></p>
<p>
I&#8217;ve found that when most people think of extensions, they think of consumer extensions like the add-ons available on <a href="https://addons.mozilla.org">addons.mozilla.org</a>. But you can also build extensions to meet needs within your business. I&#8217;ve seen extensions for automating the fill in of forms as well as facilitating business processes. If you think a custom Firefox extension would help your business, there are <a href="https://wiki.mozilla.org/Consulting">companies that can help you with that</a>, <a href="http://consulting.kaply.com/">including me</a>.
</p>
<p>
Going into detail about how to build an extension is not my goal here. There are plenty of resources on the web. <a href="https://developer.mozilla.org/Extensions">MDN is a good place to start</a>. What I would like to do is talk about an extension I built called the <a href="https://addons.mozilla.org/firefox/addon/cck/?src=blog">CCK Wizard</a>.
</p>
<p>
Before we talk about what the CCK Wizard is, let&#8217;s talk about what the CCK was. CCK stands for Client Customization Kit. The primary purpose of the CCK was customizing Netscape Communicator for ISPs. So when Earthlink wanted to deploy a customized Netscape with all their settings, they used the CCK to change the titlebar to say &#8220;Netscape Communicator by Earthlink,&#8221; configure connection settings, set the homepage and more. It also repackaged Netscape with a custom installer. You can read <a href="https://wiki.mozilla.org/CCK">more history here</a>.
</p>
<p>
When I worked at IBM, one of our goals was to increase the enterprise adoption of Firefox, so I decided to take the concepts of the Mission Control Desktop and the Client Customization Kit and combine them to create a new extension for Firefox called the <a href="https://addons.mozilla.org/firefox/addon/cck/?src=blog">CCK Wizard</a>.
</p>
<p>
The CCK Wizard takes you through a wizard to customize Firefox and then generates an XPI at the end that you can install into Firefox to use your customizations. The CCK Wizard allows you to:</p>
<ul>
<li>Change the default home page and startup override home page</li>
<li>Change the title bar text</li>
<li>Add a help menu item that links to a web page</li>
<li>Provide sites for which popups, cookies and XPInstalls are allowed by default</lo>
<li>Preinstall browser plug-ins</li>
<li>Preinstall search engines</li>
<li>Add folders, bookmarks and live bookmarks to the personal toolbar</li>
<li>Add folders, bookmarks and live bookmarks to the bookmarks folder</li>
<li>Set default preferences</li>
<li>Lock preferences</li>
<li>Add registry keys (Windows only)</li>
<li>Add certificates</li>
<li>Set default proxy configurations</li>
<li>Package other XPIs with your distribution</li>
<li>Disable about:config</li>
</ul>
<p>The CCK has been used by many companies including IBM to customize Firefox for their employees.
</p>
<p>
I would strongly recommend that you take a look at the CCK Wizard if you haven&#8217;t. It might save you a lot of work.
</p>
<p>
The CCK Wizard is open source and is maintained at <a href="http://code.google.com/p/ff-cckwizard/">code.google.com</a>. Anyone is welcome to participate.
</p>
<p>
To be perfectly honest, I have not been able to invest as much time in the CCK Wizard as I want. I&#8217;ve been able to keep it current with changes to Firefox, but have not been able to really give it the love it needs. I&#8217;m hoping to be able to carve out more time for it in the future.
</p>
<p>
And that concludes our series about customizing Firefox. Any questions?</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/04/13/customizing-firefox-extensions-and-the-cck-wizard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customizing Firefox &#8211; Disabling Safe Mode</title>
		<link>http://mike.kaply.com/2012/04/10/customizing-firefox-disabling-safe-mode/</link>
		<comments>http://mike.kaply.com/2012/04/10/customizing-firefox-disabling-safe-mode/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 15:55:34 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1518</guid>
		<description><![CDATA[I have one more post planned about customizing Firefox with add-ons and the CCK Wizard, but I wanted to get this out in the mean time. A lot of people ask how to disable safe mode in Firefox in an enterprise environment. This post will tell you how to do it with an add-on. In [...]]]></description>
			<content:encoded><![CDATA[<p>
I have one more post planned about customizing Firefox with add-ons and the CCK Wizard, but I wanted to get this out in the mean time.
</p>
<p>
A lot of people ask how to disable <a href="http://support.mozilla.org/en-US/kb/Safe%20Mode">safe mode</a> in Firefox in an enterprise environment. This post will tell you how to do it with an add-on.
</p>
<p><span id="more-1518"></span></p>
<p>
In my previous post about <a href="http://mike.kaply.com/2012/02/09/integrating-add-ons-into-firefox/">Integrating Add-ons into Firefox</a>, I talked about putting add-ons into the <tt>distribution/bundles</tt> directory. The important thing to realize about putting add-ons into this directory is they become a part of Firefox. They are not disabled when Firefox is placed into safe mode (and they shouldn&#8217;t be!). So we can build an add-on that disables safe mode and by placing it here, it will always be executed.
</p>
<p>
Unfortunately, we can&#8217;t completely remove the concept of safe mode. The code that makes safe mode happen is in C++ startup code, so we can&#8217;t mess with that. But we can make it so that when the safe mode dialog appears, it simply is ignored and the browser is restarted. We do that by overriding the safe mode dialog and forcing it to press the &#8220;Make Changes and Restart&#8221; button without actually making any changes.
</p>
<p>
This is a very simple add-on that will consist of two files. I&#8217;ll tell you exactly where to put them and where to name them.
</p>
<p>
Note: There is no need for an install.rdf when you put add-ons in <tt>distribution/bundles</tt>. (I just discovered this.) Also, it doesn&#8217;t matter what the directory is called under bundles.
</p>
<p>
<tt>chrome.manifest</tt> goes in <tt>distribution/bundles/disablesafemode</tt> and looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
content disablesafemode content/

overlay chrome://browser/content/safeMode.xul chrome://disablesafemode/content/safeMode.xul
</pre>
</p>
<p>
<tt>safeMode.xul</tt> goes in <tt>distribution/bundles/disablesafemode/content</tt> and looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;overlay xmlns=&quot;http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul&quot;&gt;
&lt;dialog hidden=&quot;true&quot; id=&quot;safeModeDialog&quot; onload=&quot;onOK()&quot;/&gt;
&lt;/overlay&gt;
</pre>
</p>
<p>
You can test it by starting Firefox with the -safe-mode parameter or holding down the shift key on Windows or option key on Mac. You&#8217;ll see the safe mode window show up for a second (sized very small) and then the browser will restart.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/04/10/customizing-firefox-disabling-safe-mode/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Customizing Firefox &#8211; Default Profiles</title>
		<link>http://mike.kaply.com/2012/03/30/customizing-firefox-default-profiles/</link>
		<comments>http://mike.kaply.com/2012/03/30/customizing-firefox-default-profiles/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 16:14:46 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1506</guid>
		<description><![CDATA[Update: I have made major modifications to this post. I was not aware that Firefox copied the contents of the defaults/profile directory on the file system after using the files on omni.ja(r). This next method of customization is not as widely used, but it is still worth mentioning. It involves changing the files that Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>
<b>Update: </b>I have made major modifications to this post. I was not aware that Firefox copied the contents of the defaults/profile directory on the file system after using the files on omni.ja(r).
</p>
<p>This next method of customization is not as widely used, but it is still worth mentioning. It involves changing the files that Firefox uses when creating a new profile. We&#8217;ll also take this opportunity to talk about userContent.css and userChrome.css which we mentioned earlier.
</p>
<p><span id="more-1506"></span></p>
<p>
When you create a new profile in Firefox, the profile is prepopulated from the directory <tt>defaults/profile</tt> in the file omni.ja(r) as well as the contents of the <tt>defaults/profile</tt> directory where Firefox is installed. The contents of the <tt>defaults/profile</tt> directory are copied over <strong>after</strong> the files in omni.ja(r). To retrieve the files you want to modify, unzip the file omni.ja(r) in the Firefox directory and you&#8217;ll see the following files in the <tt>defaults/profile</tt> directory:</p>
<pre>
bookmarks.html
chrome/userChrome-example.css
chrome/userContent-example.css
localstore.rdf
mimeTypes.rdf
prefs.js
</pre>
<p>
Copy the files you want to modify into the directory <tt>defaults/profile</tt> where Firefox is installed (you&#8217;ll have to create this directory). When a new profile is created, these files (and any other files that are also in the directory) are copied over. You have a two choices when it comes to modifying the default profile &#8211; changing the existing files or adding your own.
</p>
<p>
If you add additional files into this directory, those files are copied into the default profile along with the rest of the files. This is most commonly used if you want to have default certificate databases. I&#8217;ve seen cases where someone started Firefox, added the certificates and certificates authorities they needed and then copied the various *.db profiles from their profile and put them in the default profile so all their users would get them.
</p>
<p>
The other thing you can do is modify the existing files.
</p>
<p>
You can modify <tt>bookmarks.html</tt> to add or remove bookmarks. The file has a somewhat unique format, but it&#8217;s pretty straightforward to change.
</p>
<p>You can modify <tt>prefs.js</tt> to set default preferences for a user. Here&#8217;s an example of setting a preference in prefs.js:</p>
<pre class="brush: plain; title: ; notranslate">
user_pref(&quot;browser.startup.homepage&quot;, &quot;http://mike.kaply.com&quot;);
</pre>
<p>You can overwrite <tt>localstore.rdf</tt> if you want to customize the browser. <tt>localstore.rdf</tt> stores things like the size of the browser, whether or not certain toolbars are displayed and more. You can make customizations in your browser and then copy the <tt>localstore.rdf</tt> from your profile into the default profile.
</p>
<p>
But by far the most interesting files in the default profile are <tt>userChrome-example.css</tt> and <tt>userContent-examples.css</tt>. When these files are present in your profile using their correct names &#8211; <tt>userChrome.css</tt> and <tt>userContent.css</tt> &#8211; they can be used to override just about anything on web pages and in the browser.
</p>
<p>
<tt>userChrome.css</tt> allows you to modify the chrome of Firefox. That&#8217;s the area around the browser window. So for instance, if you wanted all menuitems to be bigger, you could specify:</p>
<pre class="brush: plain; title: ; notranslate">
menu, menuitem {
  font-size: 32px !important;
}
</pre>
<p>There are so many things you can do with this file, I couldn&#8217;t even begin to describe them here. You can hide menuitems, change parts of the UI, etc. If you choose to hide something, it&#8217;s better to use <tt>visibility: collapse</tt> than <tt>display: none</tt>. Messing with display can cause very strange results in Firefox. If you&#8217;re interested in figuring out the IDs of the various elements of the UI, check out <a href="https://addons.mozilla.org/firefox/addon/dom-inspector-6622/">the DOM Inspector</a>. You can also just browser through the source code. <a href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-menubar.inc">browser-menubar.inc</a> and <a href="http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-context.inc">browser-context.inc</a> are particularly useful.
</p>
<p>
<tt>userContent.css</tt> allows you to customize the content of web pages. There are even ways to make your styles <a href="http://web-professor.net/wp/2008/05/22/firefox-hack-notes-about-site-specific-stylesheets/">only apply to certain web pages</a>. There&#8217;s a <a href="http://www.google.com/search?q=userChrome.css">ton of information about userChrome.css</a> on the web, so I can&#8217;t really do it justice in this post. I just want to make sure you are aware of it.
</p>
<p>
If you do choose to use <tt>userContent.css</tt> or <tt>userChrome.css</tt>, I would suggest the methods I talked about in <a href="http://mike.kaply.com/2012/03/22/customizing-firefox-advanced-autoconfig-files/">my earlier post on autoconfig</a>. Then you don&#8217;t have to mess with the default profile.
</p>
<p>
Modifying the default profile can be a handy way to set some defaults for your user, but remember that these files are only used when a new profile is created.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/03/30/customizing-firefox-default-profiles/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Customizing Firefox &#8211; distribution.ini</title>
		<link>http://mike.kaply.com/2012/03/26/customizing-firefox-distribution-ini/</link>
		<comments>http://mike.kaply.com/2012/03/26/customizing-firefox-distribution-ini/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 17:46:35 +0000</pubDate>
		<dc:creator>Mike Kaply</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://mike.kaply.com/?p=1501</guid>
		<description><![CDATA[In many of my previous posts about installing add-ons into Firefox, I have mentioned the distribution directory. While I&#8217;ve primarily indicated that it is a place for installing add-ons, it&#8217;s actually useful for more than that. Files in the distribution directory are what allow for custom Firefox distributions like Firefox with Twitter or anything produced [...]]]></description>
			<content:encoded><![CDATA[<p>
In many of my previous posts about installing add-ons into Firefox, I have mentioned the distribution directory. While I&#8217;ve primarily indicated that it is a place for installing add-ons, it&#8217;s actually useful for more than that. Files in the distribution directory are what allow for custom Firefox distributions like <a href="http://twitter.com/#!/download/firefox/">Firefox with Twitter</a> or anything produced by <a href="https://byob.mozilla.com/en-US">build your own browser</a>. Besides installing add-ons with a distribution, there are two other things you can do: install search engines and customize preferences and bookmarks with a file called <tt>distribution.ini</tt>.
</p>
<p><span id="more-1501"></span></p>
<p>
First let&#8217;s talk about search engines. Typically when someone includes a search engine with an add-on, they put it in the add-ons <tt>searchplugins</tt> directory. If, however, you&#8217;re installing your add-on by placing it in the bundles directory (<a href="http://mike.kaply.com/2012/02/09/integrating-add-ons-into-firefox/">see this post</a>), the searchplugin will not appear. You must put your search engine in the file <tt>searchplugins/common</tt> under the distribution directory. I you have locale specific search engines, instead of putting them in a directory called <tt>common</tt>, you should put them in a directory that is named the same as the locale.
</p>
<p>
The <tt>distribution.ini</tt> file is where we can do more interesting things with our distribution. This file is placed at the top level in the distribution directory. The most basic <tt>distribution.ini</tt> file looks like this:</p>
<pre class="brush: plain; title: ; notranslate">
[Global]
id=someidentifier
version=1.0
about=Text that appears in About
</pre>
<p>The interesting things you can do with <tt>distribution.ini</tt> is to add preferences and to add bookmarks.
</p>
<p>
To add preferences, you would add a section like this:</p>
<pre class="brush: plain; title: ; notranslate">
[Preferences]
browser.startup.homepage=&quot;http://www.yahoo.com&quot;
</pre>
<p>These preferences become default preferences (not user preferences). It&#8217;s also worth noting that this method will allow you to set the browser.startup.homepage (unlike some other methods). In addition, these prefs can be locale specific. You can get more information <a href="https://wiki.mozilla.org/Distribution_INI_File">here</a>.
</p>
<p>
To add bookmarks to the toolbar, you would add a section like this:</p>
<pre class="brush: plain; title: ; notranslate">
[BookmarksToolbar]
item.1.title=Mike's Blog
item.1.link=http://mike.kaply.com
item.1.description=Lots of cool stuff
</pre>
<p>You can also add subfolders and place items in the bookmarks menu. You can get more information <a href="https://wiki.mozilla.org/Distribution_INI_File">here</a>.
</p>
<p>
The <tt>distribution.ini</tt> file is useful if all you want to do is add a few bookmarks and customize some preferences. It doesn&#8217;t support anything advanced like locking of preferences.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike.kaply.com/2012/03/26/customizing-firefox-distribution-ini/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  mike.kaply.com/author/mkaply/feed/ ) in 1.03939 seconds, on May 22nd, 2012 at 8:26 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on May 22nd, 2012 at 9:26 am UTC -->
