Craigslist Redesign

By Corey Holland Last update Jun 13, 2006 — Installed 5,519 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 17 posts, 14 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
bubotubor User

EDIT from below.

What the code was originally doing was parsing out the name by grabbing it from HTML BOLD tag @ index 3. Which is the 4th time it's used in the source since indexing, like arrays, start counting from zero.

Instead it will look at the first time the
tag H2 Header tag is used, which is the title of the city. Easy fix.

 
bubotubor User

intl cities fix!

on line 39 replace this:

sCity = document.getElementsByTagName('b')[3].innerHTML;

with this:

sCity = document.getElementsByTagName('h2')[0].innerHTML;

What the code was originally doing was parsing out the name by grabbing it from HTML tag index 3. Which is the 4th time it's used in the source since indexing, like arrays, start counting from zero.

Instead it will look at the first time the

tag is used, which is the title of the city. Easy fix.

 
Yochanan User

Thanks Brett!

The title always says "craigslist intl cities" no matter what city's page I'm on. I found the line in the script for this under // generates html and replaces page:

sHtml += '

craigslist' + sCity + '

';

The page the logo is supposed to be fetched from no longer exists, I'm not sure what it's supposed to be. Is the "sCity" supposed to be a variable for the city name? If so, how can this be fixed so the title matches the city's page you're on?

 
EvilJack User

dood! Brett, you are the man! I've been without this damn script for most of the year and that is all it took to fix it? Thanks you!!

 
Brett Johnson Scriptwright

You can comment line 45 or change that section to:
// gives us a clean slate to work with
if (document.getElementsByTagName('style')[0]) {
document.getElementsByTagName('head')[0].removeChild(document.getElementsByTagName('style')[0]);
}
if (document.getElementsByTagName('link')[0]) {
document.getElementsByTagName('head')[0].removeChild(document.getElementsByTagName('link')[0]);
}
document.getElementsByTagName('body')[0].innerHTML = '';

 
Chris Day User

is there a fix to make this work again?

 
Yochanan User

This suddenly stopped working last week. :(

 
Benjamin Jen... Scriptwright

The best way to use this script is to view the source, and then paste it into the edit of the script through Greasemonkey. Not a perfect way, but works for seeing the nicer layout.

 
nanobi User

If someone has a copy of this script, please let us know.

 
surtin User

Anyone still have this script? It's the only one I know that worked correctly.

 
David Grohmann User

you need to add this line to the big else clause

otherwise you cant see which links you pressed, other than the page numbers.

addGlobalStyle('a:hover { text-decoration: underline; }');

 
Avner Shanan User

Found my city's ID and fixed it.

 
Avner Shanan User

I really like the new look your script gives Craig's list, I also found the original layout annoying. I only have one problem, and thats that under 'Jobs' there is an option 'part-time' that seems harcoded to Austin, TX.

 
Corey Holland Script's Author

Script has been updated to include new cities and the search bar is no longer hard-coded to Austin, Tx. Just re-install the script.

 
Gene User

The search bar at the top is hard-coded for Austin, TX. To use this correctly you need to download it to your computer and edit it to change two elements that indicate Austin. First edit line 49 substituting the three letter code of your city for "aus". Second edit line 50 substituting the value of AreaID to the id for your city.

 
Vaguely Arti... User

I don't use craigslist very often, and the painfull interface is one reason. This makes it 200% more usable.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel