eBay - Hilight Items With Bids

Hilights items that have bids with a red border and yellow background.

当前为 2015-02-12 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name eBay - Hilight Items With Bids
  3. // @namespace http://mathemaniac.org
  4. // @include http://*.ebay.*/*
  5. // @grant none
  6. // @version 2.3.2
  7. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
  8. // @description Hilights items that have bids with a red border and yellow background.
  9. // ==/UserScript==
  10.  
  11. // Based on http://userscripts.org/users/126140 v.2.2.1
  12. // Updated for newer eBay layout.
  13.  
  14. $('document').ready(function() {
  15. $(".lvprices .lvformat").each(function() {
  16. // Skip listings with no bids.
  17. if ($(this).text().match(/\b0 bids/) || !$(this).text().match(/\d+ bids/)) return;
  18.  
  19. $(this).closest('li[listingid]').css({
  20. "border": "3px solid red",
  21. "background-color": "yellow"
  22. });
  23. });
  24.  
  25. });
  26.