<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Discussion on Craigslist image preview | Userscripts.org</title>
    <link>http://userscripts.org/scripts/show/6155</link>
    <description>Recent comments on userscript: Craigslist image preview</description>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>Archived Comments, replied by Lawk Salih</title>
      <description>&lt;p&gt;Neat script. HOWEVER, when an ad uses postlets, it returns terrible results.  &lt;/p&gt;

&lt;p&gt;Check out &lt;a href=&quot;http://washingtondc.craigslist.org/rea/&quot;&gt;http://washingtondc.craigslist.org/rea/&lt;/a&gt; for confirmation when you have this script installed.&lt;/p&gt;</description>
      <pubDate>Fri, 12 Sep 2008 17:37:45 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35734</guid>
      <author>Lawk Salih</author>
      <link>http://userscripts.org/posts/35734</link>
    </item>
    <item>
      <title>Archived Comments, replied by Kite</title>
      <description>&lt;p&gt;Since Jeffrey doesn't seem to be updating his wonderful script, I posted my bug fixes &amp;amp; improvements, plus the Canadian fix (thanks Rich!) as a new script, &quot;Craigslist image preview 2&quot;. It now filters out tiny images, and enlarges the thumbnails on mouseover. &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://userscripts.org/scripts/show/24089&quot;&gt;http://userscripts.org/scripts/show/24089&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 18 Mar 2008 21:54:51 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35735</guid>
      <author>Kite</author>
      <link>http://userscripts.org/posts/35735</link>
    </item>
    <item>
      <title>Archived Comments, replied by macm</title>
      <description>&lt;p&gt;Kind of the same thing, but works at &lt;a href=&quot;http://www.craigstoolbox.com&quot;&gt;http://www.craigstoolbox.com&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 17 Mar 2008 14:54:56 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35736</guid>
      <author>macm</author>
      <link>http://userscripts.org/posts/35736</link>
    </item>
    <item>
      <title>Archived Comments, replied by Profmuggs</title>
      <description>&lt;p&gt;whoops, that should have been:&lt;/p&gt;

&lt;p&gt;replace line 78...
&lt;br /&gt;&lt;code&gt;for (j=0; j&amp;lt;m&gt;&lt;/p&gt;

&lt;p&gt;with...
&lt;br /&gt;&lt;code&gt;for (j=0; j&amp;lt;5&gt;&lt;/code&gt;&lt;/code&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 26 Feb 2008 19:25:00 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35737</guid>
      <author>Profmuggs</author>
      <link>http://userscripts.org/posts/35737</link>
    </item>
    <item>
      <title>Archived Comments, replied by Profmuggs</title>
      <description>&lt;p&gt;Lately, the only listings that have more than 4 images are the mass postings by used car dealers and real estate agents. I find these listings annoying so I limited the number of pictures my browser displays to 6. This way I can tell the mass postings apart from the casual users who are content with the 4 image fields supplied by Craigslist. To do this I replaced line 78....&lt;/p&gt;

&lt;p&gt;for (j=0; j&amp;lt;m&gt;&lt;/p&gt;

&lt;p&gt;with...&lt;/p&gt;

&lt;p&gt;for (j=0; j&amp;lt;6&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 26 Feb 2008 19:21:51 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35738</guid>
      <author>Profmuggs</author>
      <link>http://userscripts.org/posts/35738</link>
    </item>
    <item>
      <title>Archived Comments, replied by sqladmin</title>
      <description>&lt;p&gt;A W E S O M E !!!!!&lt;/p&gt;

&lt;p&gt;this script rocks!  craigslist is sooo much
&lt;br /&gt;better now.&lt;/p&gt;</description>
      <pubDate>Tue, 19 Feb 2008 19:13:16 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35739</guid>
      <author>sqladmin</author>
      <link>http://userscripts.org/posts/35739</link>
    </item>
    <item>
      <title>Archived Comments, replied by Kite</title>
      <description>&lt;p&gt;Bug fix #1 (missing thumbnails):
&lt;br /&gt;the image preview won't appear if the original img tag in the ad has any attribute (style, border, etc.) before the source attribute. This can be fixed like so:&lt;/p&gt;

&lt;p&gt;line 71, change (/img src=\&quot;([^\&quot;]+)\&quot;/gi)) to 
&lt;br /&gt;(/&lt;img&gt;]+)&gt;/gi))&lt;/p&gt;

&lt;p&gt;line 84 &amp;amp; 85 change to: &lt;code&gt;
&lt;br /&gt;          s = s.split('src=&quot;')[1];
&lt;br /&gt;          s = s.split('&quot;')[0];
&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Bug fix #2 (small pics blown up):
&lt;br /&gt;Small images won't be enlarged if we change width &amp;amp; height to maxWidth &amp;amp; maxHeight in lines 105, 107, 166 &amp;amp; 168.&lt;/p&gt;

&lt;p&gt;Improvement #1 (small-pics clutter):
&lt;br /&gt;To filter out small images, so that they don't even appear, add this code between lines 107-108:
&lt;br /&gt;&lt;code&gt;
&lt;br /&gt;img.addEventListener(&quot;load&quot;, function() {
&lt;br /&gt;                        if (this.height &amp;lt; size) {
&lt;br /&gt;                          this.parentNode.parentNode.removeChild(this.parentNode);
&lt;br /&gt;                        } 
&lt;br /&gt;                      },true);
&lt;br /&gt;&lt;/code&gt;
&lt;br /&gt;NOTE: improvement #1 will not work without bug fix #2!&lt;/p&gt;

&lt;p&gt;Improvement #2 (enlarge thumbnail on mouseover):
&lt;br /&gt;right after the last event handler, add this code:
&lt;br /&gt;&lt;code&gt;
&lt;br /&gt;img.addEventListener(&quot;mouseover&quot;, function() {
&lt;br /&gt;                       this.style.maxHeight = 100 * size + &quot;px&quot;;
&lt;br /&gt;                       if (!keepAspectRatio) {
&lt;br /&gt;                         this.style.maxWidth = 100 * size + &quot;px&quot;;
&lt;br /&gt;                       } 
&lt;br /&gt;                     },true);
&lt;br /&gt;img.addEventListener(&quot;mouseout&quot;, function() {
&lt;br /&gt;                       this.style.maxHeight = size + &quot;px&quot;;
&lt;br /&gt;                       if (!keepAspectRatio) {
&lt;br /&gt;                         this.style.maxWidth = size + &quot;px&quot;;
&lt;br /&gt;                       } 
&lt;br /&gt;                    },true);&lt;/p&gt;

&lt;p&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;(100 is an arbitrary large number that sets the size ceiling high enough to not squash any pics.)&lt;/p&gt;</description>
      <pubDate>Tue, 22 Jan 2008 09:49:38 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35740</guid>
      <author>Kite</author>
      <link>http://userscripts.org/posts/35740</link>
    </item>
    <item>
      <title>Archived Comments, replied by Rich Lafferty</title>
      <description>&lt;p&gt;Canadians: The script has &quot;.org&quot; hardcoded, that's why it doesn't work on *.craigslist.ca. It's not enough to just add *.craigslist.ca to the list of sites it's applied to. You need to edit the script itself.&lt;/p&gt;

&lt;p&gt;Currently line 180 in the showImages() function reads
&lt;br /&gt;&lt;pre&gt;
    if (link.href &amp;amp;&amp;amp; link.href.match(/.*craigslist.org.*\/\d+\.html$/)) {
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Change that to read
&lt;br /&gt;&lt;pre&gt;
     if (link.href &amp;amp;&amp;amp; link.href.match(/.*craigslist.*\/\d+\.html$/)) {
&lt;/pre&gt;
&lt;br /&gt;You might as well edit the @include on line 5 while you're in there. &lt;/p&gt;

&lt;p&gt;I suppose the same applies for other ccTLD craigslists, if those exist.&lt;/p&gt;</description>
      <pubDate>Sun, 30 Dec 2007 01:29:51 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35741</guid>
      <author>Rich Lafferty</author>
      <link>http://userscripts.org/posts/35741</link>
    </item>
    <item>
      <title>Archived Comments, replied by tobias_funke</title>
      <description>&lt;p&gt;Great script, thanmks.  Two things:&lt;/p&gt;

&lt;p&gt;How, exactly, does one &quot;resize the image previews&quot;?&lt;/p&gt;

&lt;p&gt;Also, I agree with the previous commenter.  The enlarged small images ought to be fixed.&lt;/p&gt;</description>
      <pubDate>Sat, 29 Dec 2007 03:24:44 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35742</guid>
      <author>tobias_funke</author>
      <link>http://userscripts.org/posts/35742</link>
    </item>
    <item>
      <title>Archived Comments, replied by Kite</title>
      <description>&lt;p&gt;Works great! One little quibble, some people put tiny images in their ads, which get blown up huge &amp;amp; get in the way. This problem can be fixed by adding an if statement around the resizing code, like so:&lt;/p&gt;

&lt;p&gt;          if (img.height &gt; size) {
&lt;br /&gt;              if (!keepAspectRatio) {
&lt;br /&gt;                img.style.width = size + &quot;px&quot;;
&lt;br /&gt;              }
&lt;br /&gt;              img.style.height = size + &quot;px&quot;;
&lt;br /&gt;          }&lt;/p&gt;

&lt;p&gt;(First and last lines are new code). It needs to be done in both newFunction and changeSizes. I tested it, seeemed to work, but was a little buggy in the changeSizes function. I'm new to javascript, so I probably missed something...&lt;/p&gt;</description>
      <pubDate>Fri, 21 Dec 2007 02:23:53 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35743</guid>
      <author>Kite</author>
      <link>http://userscripts.org/posts/35743</link>
    </item>
    <item>
      <title>Archived Comments, replied by Stoney</title>
      <description>&lt;p&gt;Just wondering if it is still working for Craigslist Canadian postings. I can get it too work for all of the American cities, but when I try it with Canadian cities, it no longer works.
&lt;br /&gt;IE.  &lt;a href=&quot;http://toronto.craigslist.ca/sys/&quot;&gt;http://toronto.craigslist.ca/sys/&lt;/a&gt;   no pictures at all. If you don't mind could someone click on the link and let me know if the images show up. Thanks Stoney&lt;/p&gt;</description>
      <pubDate>Thu, 08 Nov 2007 23:53:18 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35744</guid>
      <author>Stoney</author>
      <link>http://userscripts.org/posts/35744</link>
    </item>
    <item>
      <title>Archived Comments, replied by nastajus</title>
      <description>&lt;p&gt;works perfectly in my single page test at &lt;a href=&quot;http://toronto.craigslist.org/search/sss?query=hex&quot;&gt;http://toronto.craigslist.org/search/sss?query=hex&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 18 Oct 2007 04:47:48 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35745</guid>
      <author>nastajus</author>
      <link>http://userscripts.org/posts/35745</link>
    </item>
    <item>
      <title>Archived Comments, replied by Martin Jessen</title>
      <description>&lt;p&gt;This works fine except for when looking at cars and trucks, the first image is a blank picture!
&lt;br /&gt;See example:
&lt;br /&gt;&lt;a href=&quot;http://silenceisdefeat.org/~deltron/craigslist.png&quot;&gt;http://silenceisdefeat.org/~deltron/craigslist.png&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 18 Oct 2007 03:25:05 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35746</guid>
      <author>Martin Jessen</author>
      <link>http://userscripts.org/posts/35746</link>
    </item>
    <item>
      <title>Archived Comments, replied by Alan Hogan</title>
      <description>&lt;p&gt;Doesn't work in Opera... Would love it if you could make it work in Opera?&lt;/p&gt;</description>
      <pubDate>Sat, 09 Jun 2007 19:27:46 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35747</guid>
      <author>Alan Hogan</author>
      <link>http://userscripts.org/posts/35747</link>
    </item>
    <item>
      <title>Archived Comments, replied by fan</title>
      <description>&lt;p&gt;This is a great script!
&lt;br /&gt;Would there be any way to have the images show in real size on mouse over?&lt;/p&gt;</description>
      <pubDate>Sat, 09 Jun 2007 17:44:15 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35748</guid>
      <author>fan</author>
      <link>http://userscripts.org/posts/35748</link>
    </item>
    <item>
      <title>Archived Comments, replied by Tetsuya Saito</title>
      <description>&lt;p&gt;Works! You just need to wait a little as it retrieves them.&lt;/p&gt;</description>
      <pubDate>Tue, 16 Jan 2007 05:33:07 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35749</guid>
      <author>Tetsuya Saito</author>
      <link>http://userscripts.org/posts/35749</link>
    </item>
    <item>
      <title>Archived Comments, replied by Patrick 3</title>
      <description>&lt;p&gt;This script would be great... if it weren't so handicapped by only working on real estate pages.  I don't understand how/why that is, I browse for furniture all the time, but houses only once in a while.&lt;/p&gt;</description>
      <pubDate>Sat, 25 Nov 2006 17:20:53 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35750</guid>
      <author>Patrick 3</author>
      <link>http://userscripts.org/posts/35750</link>
    </item>
    <item>
      <title>Archived Comments, replied by NoWai</title>
      <description>&lt;p&gt;this doesnt work.&lt;/p&gt;</description>
      <pubDate>Tue, 14 Nov 2006 07:17:35 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35751</guid>
      <author>NoWai</author>
      <link>http://userscripts.org/posts/35751</link>
    </item>
    <item>
      <title>Archived Comments, replied by Swakky</title>
      <description>&lt;p&gt;It worked perfectly for me, thanks!&lt;/p&gt;</description>
      <pubDate>Wed, 01 Nov 2006 06:08:49 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35752</guid>
      <author>Swakky</author>
      <link>http://userscripts.org/posts/35752</link>
    </item>
    <item>
      <title>Archived Comments, replied by antwerpe</title>
      <description>&lt;p&gt;this doesnt work.&lt;/p&gt;</description>
      <pubDate>Wed, 01 Nov 2006 00:19:07 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35753</guid>
      <author>antwerpe</author>
      <link>http://userscripts.org/posts/35753</link>
    </item>
    <item>
      <title>Archived Comments, replied by Jesse Andrews</title>
      <description>&lt;p&gt;The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)&lt;/p&gt;</description>
      <pubDate>Wed, 17 Nov 2004 01:05:03 +0000</pubDate>
      <guid isPermaLink="false">userscripts.org:12482:35733</guid>
      <author>Jesse Andrews</author>
      <link>http://userscripts.org/posts/35733</link>
    </item>
  </channel>
</rss>
