Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
PPills
Oct 5, 2004
I'm not sure if this is the right place but I was using this Tampermonkey script for Ebay to highlight listings that had bids, but after they changed the format, it no longer worked. So I would really appreciate it if someone could show me, a person with no coding experience, how to fix it.

code:
// ==UserScript==
// @name           eBay - Hilight Items With Bids
// @namespace      [url]http://userscripts.org/users/126140[/url]
// @include        [url]http://*.ebay.*/*[/url]
// @grant	   none
// @updateURL	   [url]https://userscripts.org/scripts/source/66089.meta.js[/url]
// @downloadURL	   [url]https://userscripts.org/scripts/source/66089.user.js[/url]
// @version	   2.2.1
// @require 	   [url]http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js[/url]
// @description	   Hilights items that have bids with a red border and yellow background.
// ==/UserScript==


$('document').ready(function() {
	$(".bids").each(function() {
		var text = $(this).text();
		var regExp = /[0-9]+.(b|B)ids?/;
		
		if (regExp.test(text)) {
			var match = regExp.exec(text);
			var sNumBids = match[0].split(" ",1);
			var numBids = parseInt(sNumBids, 10);
			if(numBids > 0) {
				$(this).closest('table').css("border","3px solid red");
				$(this).closest('table').css("background-color","yellow");
			}
		}
	});

});

I would really appreciate it. Thanks.

Adbot
ADBOT LOVES YOU

PPills
Oct 5, 2004

Oh my gawd. Thank you very much! Words cannot express how much I appreciate this.

Now, I assume this would not be compatible with the old layout design? Ebay had changed it to this new design a couple of months back for a very short period of time, then reverted to the old one. This would be the second time I've seen the layout changed, and I have a feeling it is here to stay. When will people learn, if it ain't broke, don't fix it? I gathered from their forum that most people don't like the new layout and even found it causing problems for their browsers.

Also, I appreciate the fact that your script doesn't prevent the item refinements box from popping up, as the old script completely broke the javascript (or whatever it's called).

P.S., looking at the source, it seems so simple, yet leaves me almost completely stumped.

Thanks again!

PPills
Oct 5, 2004
I am looking for a chrome extension that can highlight multiple phrases, not just multiple words.

https://chrome.google.com/webstore/detail/multi-highlight/pfgfgjlejbbpfmcfjhdmikihihddeeji?hl=en-US

Multi-Highlight claims that it will support it in version 2.0 but it hasn't been updated since February 2014. :(

  • Locked thread