r/CarTalkUK•
AirconGuyUK

I made a bookmarklet that improves the autotrader experience (Desktop only)

Tools/External Sites

Bookmarklet is a bookmark you add to your bookmarks bar that when clicked runs some javascript on the page you're on. Won't work on Safari, will work on chrome and firefox.

When you press it, it will show you when the ad was first uploaded. It will put a little date in the corner of each listing. Red is less than 3 month old listing, orange is less than 6 month old listing, and green is over 6 month old listing.

It also excludes all results from Birmingham, Bradford, and Luton.

Here it is:

javascript:(function(){const now=new Date();const excludeLocations=['Luton','Birmingham','Bradford'];const links=document.querySelectorAll('a[href*="/car-details/"]');links.forEach(link=>{const match=link.href.match(/\/car-details\/(\d+)/);if(!match)return;const id=match[1];if(id.length<8)return;let tile=link.closest('li')||link.closest('article')||link.closest('[data-testid]');if(!tile)tile=link.parentElement;const tileText=tile.textContent||'';if(excludeLocations.some(loc=>tileText.toLowerCase().includes(loc.toLowerCase()))){tile.style.display='none';return;}if(tile.querySelector('.at-date-badge'))return;const dateStr=id.substring(0,8);const year=parseInt(dateStr.substring(0,4));const month=parseInt(dateStr.substring(4,6))-1;const day=parseInt(dateStr.substring(6,8));const listDate=new Date(year,month,day);const diffMonths=(now.getFullYear()-listDate.getFullYear())*12+(now.getMonth()-listDate.getMonth());let bgColor;if(diffMonths>=6){bgColor='#228B22';}else if(diffMonths>=3){bgColor='#FF8C00';}else{bgColor='#DC143C';}const formattedDate=dateStr.substring(6,8)+'/'+dateStr.substring(4,6)+'/'+dateStr.substring(0,4);tile.style.position='relative';const badge=document.createElement('div');badge.className='at-date-badge';badge.textContent=formattedDate;badge.style.cssText='position:absolute;top:8px;left:8px;background:'+bgColor+';color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;font-weight:bold;z-index:100;pointer-events:none;';tile.insertBefore(badge,tile.firstChild);});const hidden=document.querySelectorAll('li[style*="display: none"]').length;const dated=document.querySelectorAll('.at-date-badge').length;alert('Added dates to '+dated+' listings, hidden '+hidden+' excluded locations');})();

Some other people might find it useful.

Posted Dec 13, 2025, 10:25 AM UTC

10
Loading comments…