<?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>Playing on the frontier &#187; mozilla</title>
	<atom:link href="http://siphon9.net/loune/category/mozilla/feed/" rel="self" type="application/rss+xml" />
	<link>http://siphon9.net/loune</link>
	<description></description>
	<lastBuildDate>Thu, 15 Jul 2010 12:58:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting your Firefox extension version number</title>
		<link>http://siphon9.net/loune/2010/07/getting-your-firefox-extension-version-number/</link>
		<comments>http://siphon9.net/loune/2010/07/getting-your-firefox-extension-version-number/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 10:45:57 +0000</pubDate>
		<dc:creator>Loune</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://siphon9.net/loune/?p=158</guid>
		<description><![CDATA[Sometimes you just want to show the version number (or any other meta data) of your own Firefox addon as specified in the install.rdf. You want to display this in your about page for example. In Firefox 2 and 3, you can to use this function:

function getVersion(addonID) {
		var extMan = Components.classes[&#34;@mozilla.org/extensions/manager;1&#34;].getService(Components.interfaces.nsIExtensionManager);
		var ext = extMan.getItemForID(addonID);
		ext.QueryInterface(Components.interfaces.nsIUpdateItem);
		return ext.version;
}

// [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you just want to show the version number (or any other meta data) of your own Firefox addon as specified in the install.rdf. You want to display this in your about page for example. In Firefox 2 and 3, you can to use this function:</p>
<pre class="brush: jscript;">
function getVersion(addonID) {
		var extMan = Components.classes[&quot;@mozilla.org/extensions/manager;1&quot;].getService(Components.interfaces.nsIExtensionManager);
		var ext = extMan.getItemForID(addonID);
		ext.QueryInterface(Components.interfaces.nsIUpdateItem);
		return ext.version;
}

// usage
var version = getVersion(&quot;{my addon id}&quot;);
</pre>
<p>Inputting your addon ID, you will get your version number back. Inside the method, the variable ext (nsIUpdateItem) has a lot more metadata properties you can use as well if you so choose.</p>
<p>However, in the new Firefox version 4, the addon APIs have totally changed. The call to get the addon metadata has changed from synchronous to asynchronous which tends throws a spanner into the works. There seems to be a tendency to migrate all javascript data calls to asynchronous to avoid freezing the UI. Thus, rewriting getVersion means rewriting all the consumers to expect asynchronous operations. Here&#8217;s the new version that supports Firefox versions 2 to 4.</p>
<pre class="brush: jscript;">
function getVersion(addonID, callback) {
	var ascope = { };

	if (typeof(Components.classes[&quot;@mozilla.org/extensions/manager;1&quot;]) != 'undefined') {
		var extMan = Components.classes[&quot;@mozilla.org/extensions/manager;1&quot;].getService(Components.interfaces.nsIExtensionManager);
		var ext = extMan.getItemForID(addonID);
		ext.QueryInterface(Components.interfaces.nsIUpdateItem);
		callback(ext.version);
		return;
	}

	if (typeof(Components.utils) != 'undefined' &amp;&amp; typeof(Components.utils.import) != 'undefined') {
		Components.utils.import(&quot;resource://gre/modules/AddonManager.jsm&quot;, ascope);
	}

	ascope.AddonManager.getAddonByID(addonID, function (addon) { callback(addon.version); } );

}

// usage:
var version;
getVersion(&quot;{my addon id}&quot;, function(ver) { version = ver; });
// you don't know when version will be populated
</pre>
<p>Generally, in my use cases, I need to get the version and I don&#8217;t want to continue on until I have the version. Other than rewriting, the only workaround is to fetch the version number on extension start up and cache it somewhere. Thus all subsequent get version calls will get that cached number synchronously. Such a pain :/</p>
]]></content:encoded>
			<wfw:commentRss>http://siphon9.net/loune/2010/07/getting-your-firefox-extension-version-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A radical vision for Thunderbird</title>
		<link>http://siphon9.net/loune/2007/11/a-radical-vision-for-thunderbird/</link>
		<comments>http://siphon9.net/loune/2007/11/a-radical-vision-for-thunderbird/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 04:41:22 +0000</pubDate>
		<dc:creator>Loune</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://siphon9.net/loune/2007/11/a-radical-vision-for-thunderbird/</guid>
		<description><![CDATA[After hearing about the recent plans of Mozilla Co. spinning off Thunderbird into a new organisation, I can&#8217;t help but add my 2c. I see an opportunity for radical change in the direction of Thunderbird. I&#8217;ve personally used Thunderbird since the 1.0 days and it&#8217;s been an invaluable tool to manage of my email. However, [...]]]></description>
			<content:encoded><![CDATA[<p>After hearing about the recent plans of Mozilla Co. <a href="http://weblogs.mozillazine.org/mitchell/archives/2007/09/mozillas_new_focus_on_thunderb.html">spinning off Thunderbird</a> into a new organisation, I can&#8217;t help but add my 2c. I see an opportunity for radical change in the direction of Thunderbird. I&#8217;ve personally used Thunderbird since the 1.0 days and it&#8217;s been an invaluable tool to manage of my email. However, there in lies the problem. With more and more people using online email these days, the role of Thunderbird is diminishing. If we step back and look at the fundamental problem which Thunderbird, which email, solves &#8211; It&#8217;s the communication between users. We now have many more forms of communication and interaction between users. More and more email is taking a backstage to more contemporary mediums such as IM and even social networking sites like MySpace and Facebook. So why are we still looking at email? There seems to be a general consensus that Thunderbird should grow into a PIM/Email client. A email/personal organiser is good, but why would you want to create something that&#8217;s already available? We shouldn&#8217;t be chasing the tail lights of Outlook and Evolution.</p>
<p>What I&#8217;m suggesting here I guess is to rethink Thinderbird &#8211; lose the focus on mail, in favour of more interesting communication mediums like IM, Facebook and MySpace. With the launch of <a href="http://code.google.com/apis/opensocial/">OpenSocial</a> from Google, connecting to social networks should be made much more easily. Thunderbird can utilise these APIs to bring users of social networks what it brought to email users in the past. There is a growing user base of social networks and it&#8217;s only getting larger. With many users part of several networks, managing their identities across these networks can become a painful and time-consuming. An application that manages multiple networks, a social network aggregator if you will, is something that we be desired of from these users. Thunderbird can handle multiple email accounts and it doesn&#8217;t take much to see that a natural evolution would be handling multiple social network accounts.</p>
<p>The new functionality, like managing social networks can&#8217;t be tacked on like an extra arm to the email functionality. There has to be a rethink from ground up. Right now the interface of Thunderbird is that of traditional email clients. You have accounts and folders and emails. This legacy model will be hard and awkward to reconcile with newer social networking models. Classification of messages/emails are no longer done with folders but with tags that allow them to he connected to multiple categories. Instead of the &#8216;address book&#8217; you now have &#8216;friends&#8217; and you certainly want to tag them.</p>
<p>Whether this new application, be it Thunderbird or a something brand new, there exists an opportunity to fill an enormous and growing void. Thunderbird is at crossroads and if there is a better time for a new direction, it would be now. In the post, I&#8217;ve mainly talked about one facet, which is social networking, but there are many other facets (IM/VoIP/Cal?) I believe should be part of the broader Thunderbird strategy. Aggregating all the different types of communication is surely a role that fits a next generation Thunderbird. This idea is not new and some members of the community share <a href="http://www.arcanology.com/2007/09/04/messaging-clients-in-the-post-web-20-world/">similar</a> <a href="http://ascher.ca/blog/2007/10/06/open-letter-to-the-thunderbird-community/#comments">views</a>.</p>
<p>Remember, as the /. meme goes, in Korea, only old people use email.</p>
]]></content:encoded>
			<wfw:commentRss>http://siphon9.net/loune/2007/11/a-radical-vision-for-thunderbird/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple lightweight NTLM in PHP</title>
		<link>http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/</link>
		<comments>http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 12:00:44 +0000</pubDate>
		<dc:creator>Loune</dc:creator>
				<category><![CDATA[mozilla]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/</guid>
		<description><![CDATA[Many months ago I made a PHP script that could read NTLM authentication information from your browser. What&#8217;s NTLM? Basically, if you&#8217;re using Microsoft Windows, your browser can automatically send your windows login information to a website (if you agree to it). This means that without needing to enter additional username or passwords, you can [...]]]></description>
			<content:encoded><![CDATA[<p>Many months ago I made a PHP script that could read NTLM authentication information from your browser. What&#8217;s NTLM? Basically, if you&#8217;re using Microsoft Windows, your browser can automatically send your windows login information to a website (if you agree to it). This means that without needing to enter additional username or passwords, you can be authenticated at the website you&#8217;re visiting. This is quite convenient especially for company intranets. NTLM should work with all major browsers (Internet Explorer, Firefox and Opera).</p>
<p>The PHP code I wrote is simple and can be inserted into the top of any PHP script. The key output is $user $domain $workstation, which is the information advertised by the user. Be warned though, the script does NOT authenticate the user and merely assumes that the user is who they say they are. This is akin to a user entering only a username with no password required. I plan to add password/hash verification possibly in conjuction with samba in the future.</p>
<p>A limitation is that the PHP script relies on apache_request_headers() which is only available if you run PHP as a apache module.</p>
<p>You can get the source of the PHP code <strong><a href="/loune/f/ntlm.php.txt">here</a></strong>.</p>
<p>If you try the script in Firefox (on windows), you will notice that you get prompted for a username and password when encountering an NTLM challenge. This is because sending your windows credentials to any unscrupulous website poses a real security risk. To make it automatically use your windows credentials for sites you trust, you can add the website to a whitelist.</p>
<p>The whitelist is located at Firefox&#8217;s about:config (type that into the address bar), which allows the editing of all of the browser&#8217;s preferences. Find the preference entry network.automatic-ntlm-auth.trusted-uris, double click on it and type the hostname of the site (ie http://www.abc.com) that you want in your whitelist. Multiple entries are seperated by commas. After doing that, Firefox should send your windows creds automatically.</p>
<p><b>Update 20/09/2009. The above script is outdated, anyone wishing to use NTLM should see the new post: <a href="http://siphon9.net/loune/2009/09/ntlm-authentication-in-php-now-with-ntlmv2-hash-checking/">Part 2 &#8211; Now with hash checking</a></b></p>
]]></content:encoded>
			<wfw:commentRss>http://siphon9.net/loune/2007/10/simple-lightweight-ntlm-in-php/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Multiple Cookie Containers for Firefox</title>
		<link>http://siphon9.net/loune/2007/05/multiple-cookie-containers-for-firefox/</link>
		<comments>http://siphon9.net/loune/2007/05/multiple-cookie-containers-for-firefox/#comments</comments>
		<pubDate>Mon, 14 May 2007 11:25:43 +0000</pubDate>
		<dc:creator>Loune</dc:creator>
				<category><![CDATA[mozilla]]></category>

		<guid isPermaLink="false">http://siphon9.net/loune/2007/05/multiple-cookie-containers-for-firefox/</guid>
		<description><![CDATA[A few weeks ago I began work on modifying the cookie system on Firefox to support multiple &#8220;containers&#8221;. Multiple Containers enables users to log in to many websites as multiple users on the same Firefox session. It is very useful for web developers who require this functionality to test their user account systems. Another use [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I began work on modifying the cookie system on Firefox to support multiple &#8220;containers&#8221;. Multiple Containers enables users to log in to many websites as multiple users on the same Firefox session. It is very useful for web developers who require this functionality to test their user account systems. Another use is for people who have multiple web mail accounts with the same provider that they want simultaneously logged on to. This is an oft-requested feature that Internet Explorer partially supports. (See bug #117222)</p>
<p>I&#8217;m happy to say that this is now ready for testing. Below is a working build for Windows. It is based on the latest Trunk plus the cookie patch and extension. Unfortunately for Mac and Linux users that wish to try the patch, they will have to manually compile Firefox with the patch below.</p>
<p><span id="more-4"></span><br />
Note that this build is meant for users who are familiar with using Firefox test builds and not intended for production. You are recommended to <a href="http://kb.mozillazine.org/Profile_Manager">create a new profile</a>. If you intend to use an existing Firefox Trunk profile on the cookie patched Firefox, the only caveat is that your old session store (windows and tabs saving) cookies will not be restored (but long term cookies will be there). Similarly when transitioning back from the patched Firefox to normal Firefox, you will lose the session cookies, but also will be unable to access cookies saved in containers other than Jar A.</p>
<p>In the patched Firefox, to use the new container, or &#8220;jars&#8221;, just click on the jar icon in the far right of the status bar. The letter represents the current selected jar for this tab. You can assign a different jar letters to each tab. Cookies from all accessed pages will be deposited in this jar. If you open a link in a new window/tab, the jar letter should carry forward to the next window/tab.</p>
<p>All long term cookies are saved in the Firefox profile folder. Jar A will be saved as cookies.txt and compatible with older Firefox. Jar B will be saved as cookies_B.txt and Jar C cookies_C.txt</p>
<p>There is a known issue in which if you have the cookie manager open while browsing, it will incorrectly show cookies listed. This is just a GUI issue and doesn&#8217;t affect the core functionality.</p>
<p><a href="/loune/f/firefoxcookies.zip">Compiled Firefox for Windows</a></p>
<p>To compile with the patch yourself, download and apply the patch the trunk (made against 13-May-2007). In the compiled result dist/bin extract cookiejarschrome.zip into the chrome subfolder.</p>
<p><a href="/loune/f/cookies.patch">Patch for trunk source</a><br />
<a href="/loune/f/cookiejarschrome.zip">cookiejarschrome.zip</a></p>
<p>Edit: Fixed links</p>
]]></content:encoded>
			<wfw:commentRss>http://siphon9.net/loune/2007/05/multiple-cookie-containers-for-firefox/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
