Comments by Kite on scripts

11 comments

Comment on:
Craigslist image preview 2

Apr 14, 2008

dpfox - Adding a delay is possible, but complicated. Here's a much simpler solution:
Put your mouse clear over to the right edge of the window, and you should be able to avoid the thumbnails as you mouse-wheel up & down.

Comment on:
Google Quote-Adder

Apr 14, 2008

I just fixed a few bugs - it now can tell the difference between a colon & a semicolon!

Comment on:
Craigslist image preview 2

Apr 14, 2008

I just fixed a bug where the last image on the line would sometimes jump to the next line when blown up. This would remove it from under the cursor, making it shrink down again. Very annoying. Is this what you were talking about, dpfox?
As far as compatability with Autopagerize and Craigslist skin BETA, I'll look into it. tobias_funke, are you talking about http://userscripts.org/scripts/show/8551?

Comment on:
Craigslist image preview 2

Mar 20, 2008

Sure, macm, go for it!

Comment on:
Craigslist image preview

Mar 18, 2008

Since Jeffrey doesn't seem to be updating his wonderful script, I posted my bug fixes & improvements, plus the Canadian fix (thanks Rich!) as a new script, "Craigslist image preview 2". It now filters out tiny images, and enlarges the thumbnails on mouseover.

http://userscripts.org/scripts/show/24089

Comment on:
Craigslist image preview 2

Mar 18, 2008

This is a reworking of "Craigslist image preview" by Jeffrey Palm.
I fixed 3 bugs & added 2 improvements.
Bug fix #1 (missing thumbnails): the image preview didn't appear if the original img tag in the ad has any attribute (style, border, etc.) before the source attribute.
Bug fix #2: Small images were enlarged.
Bug fix #3 (internationalize): Now works in Canada too.
Improvement #1 (small-pics clutter): filter out small images, so that they don't even appear
Improvement #2 (enlarge thumbnail on mouseover): up to 550x600 pixels.

Comment on:
yahoo groups sorter & cleaner

Feb 4, 2008

Updated to automatically add captions to thumbnails showing the date & size of the pictures. This feature can be turned off if you have a slow internet connection.

Comment on:
yahoo groups sorter & cleaner

Jan 29, 2008

This script replaces & greatly expands yahoo groups photo sorter & cleaner (userscripts.org/scripts/show/20157). It adds file sorting and filtering. Works well with BatchDownload. You can customize it by setting some variables in lines 10-15.

Comment on:
Craigslist image preview

Jan 22, 2008

Bug fix #1 (missing thumbnails):
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:

line 71, change (/img src=\"([^\"]+)\"/gi)) to
(/]+)>/gi))

line 84 & 85 change to:
s = s.split('src="')[1];
s = s.split('"')[0];

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

Improvement #1 (small-pics clutter):
To filter out small images, so that they don't even appear, add this code between lines 107-108:

img.addEventListener("load", function() {
if (this.height < size) {
this.parentNode.parentNode.removeChild(this.parentNode);
}
},true);

NOTE: improvement #1 will not work without bug fix #2!

Improvement #2 (enlarge thumbnail on mouseover):
right after the last event handler, add this code:

img.addEventListener("mouseover", function() {
this.style.maxHeight = 100 * size + "px";
if (!keepAspectRatio) {
this.style.maxWidth = 100 * size + "px";
}
},true);
img.addEventListener("mouseout", function() {
this.style.maxHeight = size + "px";
if (!keepAspectRatio) {
this.style.maxWidth = size + "px";
}
},true);

(100 is an arbitrary large number that sets the size ceiling high enough to not squash any pics.)

This script is out of date, but if you change textareas[49] to textareas[299], etc., it will work.

Comment on:
Craigslist image preview

Dec 21, 2007

Works great! One little quibble, some people put tiny images in their ads, which get blown up huge & get in the way. This problem can be fixed by adding an if statement around the resizing code, like so:

if (img.height > size) {
if (!keepAspectRatio) {
img.style.width = size + "px";
}
img.style.height = size + "px";
}

(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...