<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: jsfmt and jsobf available for download</title>
	<atom:link href="http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/feed/" rel="self" type="application/rss+xml" />
	<link>http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/</link>
	<description>Tim Whitlock&#039;s personal site and blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 12:28:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Tim</title>
		<link>http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-36</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 08 Dec 2009 13:26:30 +0000</pubDate>
		<guid isPermaLink="false">http://web.2point1.com/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-36</guid>
		<description>Thanks for this Reg. I guess the part of the parse tree that deals with bracket access isn&#039;t carrying the obfuscated variables into its scope. I&#039;ll take a look when I get the chance.

I didn&#039;t realise anyone was actually using it ;)</description>
		<content:encoded><![CDATA[<p>Thanks for this Reg. I guess the part of the parse tree that deals with bracket access isn&#8217;t carrying the obfuscated variables into its scope. I&#8217;ll take a look when I get the chance.</p>
<p>I didn&#8217;t realise anyone was actually using it <img src='http://timwhitlock.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg</title>
		<link>http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-35</link>
		<dc:creator>Reg</dc:creator>
		<pubDate>Sat, 05 Dec 2009 16:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://web.2point1.com/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-35</guid>
		<description>SOLVED - with workaround
I think I have isolated the situation in which the above bug occurs. In any situation as follows:
&gt;    myClass.myMember[index]
&#039;index&#039; appears to get ignored. A quick work around is to --protect one or two variable names which you can then re-use in these situations.

eg:
--protect ix,...
&gt; for(var ix; i   myClass.myMember[ix] = whatever;
&gt; }

So yea one little bug, but still a great tool!</description>
		<content:encoded><![CDATA[<p>SOLVED &#8211; with workaround<br />
I think I have isolated the situation in which the above bug occurs. In any situation as follows:<br />
&gt;    myClass.myMember[index]<br />
&#8216;index&#8217; appears to get ignored. A quick work around is to &#8211;protect one or two variable names which you can then re-use in these situations.</p>
<p>eg:<br />
&#8211;protect ix,&#8230;<br />
&gt; for(var ix; i   myClass.myMember[ix] = whatever;<br />
&gt; }</p>
<p>So yea one little bug, but still a great tool!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg</title>
		<link>http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-34</link>
		<dc:creator>Reg</dc:creator>
		<pubDate>Sat, 05 Dec 2009 00:55:57 +0000</pubDate>
		<guid isPermaLink="false">http://web.2point1.com/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-34</guid>
		<description>This is a great tool.
But I can&#039;t remove the &#039;-i&#039; switch without problems:

Example:
function ModalDisplay()
{
  ...
}
ModalDisplay.prototype = {
  ...
  clearFavourites : function()
  {
    var i;
    for (i=0; i&lt;this.thumbNails.length; i++)
    {
      this.thumbNails[i].setSelected(false);
    }
  },
  ...
}

Example after jsobf and then jsfmt on the above:
clearFavourites : function ( ) {
  var $3a;
  for ( $3a = 0; $3a &lt; this.thumbNails.length; $3a ++ ) {
    this.thumbNails[i].setSelected ( false );
  }
}

NOTE: the code reads this.thumbNails[i] and not this.thumbNails[$3a]

There are several places in my code where this happens and I have simply had to manually weed them out using the --protect switch. But I am still puzzled. Am I doing something wrong?

Reg</description>
		<content:encoded><![CDATA[<p>This is a great tool.<br />
But I can&#8217;t remove the &#8216;-i&#8217; switch without problems:</p>
<p>Example:<br />
function ModalDisplay()<br />
{<br />
  &#8230;<br />
}<br />
ModalDisplay.prototype = {<br />
  &#8230;<br />
  clearFavourites : function()<br />
  {<br />
    var i;<br />
    for (i=0; i&lt;this.thumbNails.length; i++)<br />
    {<br />
      this.thumbNails[i].setSelected(false);<br />
    }<br />
  },<br />
  &#8230;<br />
}</p>
<p>Example after jsobf and then jsfmt on the above:<br />
clearFavourites : function ( ) {<br />
  var $3a;<br />
  for ( $3a = 0; $3a &lt; this.thumbNails.length; $3a ++ ) {<br />
    this.thumbNails[i].setSelected ( false );<br />
  }<br />
}</p>
<p>NOTE: the code reads this.thumbNails[i] and not this.thumbNails[$3a]</p>
<p>There are several places in my code where this happens and I have simply had to manually weed them out using the &#8211;protect switch. But I am still puzzled. Am I doing something wrong?</p>
<p>Reg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg</title>
		<link>http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-33</link>
		<dc:creator>Reg</dc:creator>
		<pubDate>Sat, 05 Dec 2009 00:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://web.2point1.com/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-33</guid>
		<description>Further comments about the --protect switch.

I ended up adding the identifiers that I wish to protect in a &quot;special&quot; comment syntax. Then I used a script to scan the file, collect all the identifiers to protect and then invoke jsobf.

I used the following format:
//#: MyClassName
function MyClassName()
{
...
}
MyClassName.prototype = {
...
}

Note the line starting with the //#:
It would be great if you could implement a similar feature.

Thanks, keep up the great work !!!</description>
		<content:encoded><![CDATA[<p>Further comments about the &#8211;protect switch.</p>
<p>I ended up adding the identifiers that I wish to protect in a &#8220;special&#8221; comment syntax. Then I used a script to scan the file, collect all the identifiers to protect and then invoke jsobf.</p>
<p>I used the following format:<br />
//#: MyClassName<br />
function MyClassName()<br />
{<br />
&#8230;<br />
}<br />
MyClassName.prototype = {<br />
&#8230;<br />
}</p>
<p>Note the line starting with the //#:<br />
It would be great if you could implement a similar feature.</p>
<p>Thanks, keep up the great work !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Minify JavaScript code to obfuscate details and decrease load times &#124; Geekology</title>
		<link>http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-32</link>
		<dc:creator>Minify JavaScript code to obfuscate details and decrease load times &#124; Geekology</dc:creator>
		<pubDate>Wed, 20 May 2009 10:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://web.2point1.com/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-32</guid>
		<description>[...] free tools available to minify JavaScript code, with some of the most popular ones being JSMin, jsobf, and the YUI [...]</description>
		<content:encoded><![CDATA[<p>[...] free tools available to minify JavaScript code, with some of the most popular ones being JSMin, jsobf, and the YUI [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://timwhitlock.info/blog/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-31</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 08 Sep 2008 22:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://web.2point1.com/2008/09/07/jsfmt-and-jsobf-available-for-download/#comment-31</guid>
		<description>If you are obfuscating source code to use with the Prototype library, be careful. Prototype actually interrogates parts of your source code literally!!! The only example I am aware of so far is the use of $super as a function argument. This cannot be renamed because Prototype searches for it as a string literal.

To solve this problem, use the --protect option of jsobf, and don&#039;t forget to escape your &quot;$&quot; symbols ;)

jsobf --protect=\$super</description>
		<content:encoded><![CDATA[<p>If you are obfuscating source code to use with the Prototype library, be careful. Prototype actually interrogates parts of your source code literally!!! The only example I am aware of so far is the use of $super as a function argument. This cannot be renamed because Prototype searches for it as a string literal.</p>
<p>To solve this problem, use the &#8211;protect option of jsobf, and don&#8217;t forget to escape your &#8220;$&#8221; symbols <img src='http://timwhitlock.info/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>jsobf &#8211;protect=\$super</p>
]]></content:encoded>
	</item>
</channel>
</rss>

