Comments by jwo on scripts

1 comment

Comment on:
eBay Auction Enhancer

Feb 26, 2008

Hi, at the german eBay-Site, the script will only work for 'buy it now'-articles.

There seems to be a problem at line 433 / 434. The properties 'textContent', 'innerHTML' and 'nodeValue' may all be null at regular auction-articles pages which will cause an exception.

The following code fixed the problem for instance:

var enter = false;
if(endTimeNode != null)
{
if(endTimeNode.textContent != null)
{
endTimeREMatch = END_TIME_RE.exec((endTimeNode.textContent).replace(SPACE_RE, " "));

if(endTimeREMatch != null)
{
enter = true;
}
}
if(enter == false && endTimeNode.innerHTML != null)
{
endTimeREMatch = END_TIME_RE.exec((endTimeNode.innerHTML).replace(SPACE_RE, " "));

if(endTimeREMatch != null)
{
enter = true;
}
}

if(enter == false && endTimeNode.nodeValue != null)
{
endTimeREMatch = END_TIME_RE.exec((endTimeNode.innerHTML).replace(SPACE_RE, " "));

if(endTimeREMatch != null)
{
enter = true;
}
}
}

if(enter){
while (endTimeNode && endTimeNode.nodeType !=
...