Quickly list auctions similar to the one you're looking at with a simple JavaScript tool.
I'm always excited to discover something new while searching on eBay, but I've been around long enough to know that there's virtually no such thing as "one of a kind."
When you've found an item you're interested in, it's often helpful to seek out other auctions for similar items, either to compare prices or perhaps to find something better. Typically, this involves opening a search box and typing the name of the item for which to search. Here's a quick hack that will eliminate these steps and list similar items with a single click.
Create a new button on your browser's Links bar (see the "Customizing the Links Bar" sidebar for details) and type the following JavaScript code, all on one line, into the new link:
javascript:void(win=window.open('http://search.ebay.com/' + document.title.substring(document.title.indexOf(' - ') + 3)))
Make sure to note the capitalization of the JavaScript code, such
as the uppercase "O" in the indexOf
keyword. Note also the spaces around the hyphen (' - '). You can name
the new link anything you like, such as "Find Similar."
Then, open any auction page and click the new link, as shown in Figure 2-2. (Naturally, the hack won't work on a nonauction page.) A new window will appear with search results matching the title of the auction you were just looking at, which, in theory, should contain at least one auction. At this point, you can modify and repeat the search as needed.
The first part of the code, win=window.open
, instructs your browser to
open a new window and navigate to the URL that follows. The reason you
need
JavaScript is that the search URL needs to include information from the auction shown in the current window, something a static link wouldn't be able to do.
Next comes the URL to open. The first part of the URL is taken from a standard eBay search URL, as seen in "Tweak Search URLs" [Hack #13] :
http://search.ebay.com/keywords
The keywords
parameter is
then completed by including the title of the currently displayed
auction:
document.title.substring(document.title.indexOf(' - '),document.title.length)
wherein the auction title is extracted from the page title by taking only the text that appears after the hyphen (with spaces on either side) that separates the end date from the auction title.
By default, this hack searches only auction titles. To search
both titles and descriptions, you'll need to add _W0QQftsZ2
to the end of the search URL,
like this:
javascript:void(win=window.open('http://search.ebay.com/' + document.title.substring(document.title.indexOf(' - ')+3)+'_W0QQftsZ2'))
A variation of this hack might be used to search completed auctions instead of current auctions, which may be useful for finding how similar items have previously sold [Hack #42] or possibly seeing if the specific item on which you're bidding is being resold [Hack #25] . Just change the URL (http://search.ebay.com/) to that used for completed item searches:
http://search-completed.ebay.com/
Note that eBay will complain if you try to show complete auctions and search titles and descriptions at the same time, since completed items can be searched only by their titles.