Created
July 23, 2015 12:18
-
-
Save leafnode/61fa9f45ad3f81a59fef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Bidding Status | |
// @namespace leafnode | |
// @include http://allegro.pl/myaccount/bid.php | |
// @version 1 | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js | |
// ==/UserScript== | |
jQuery('#items-list tbody tr').each( function ( i ) { | |
var el = ''+jQuery(this).find('td:nth-child(2)').find('.uname a').attr('href'); | |
var winning = (el.indexOf('show_user.php') != -1); | |
if (winning) { | |
jQuery(this).append('<td style="background-color: green; border: 1px solid silver">WIN</td>'); | |
console.log("Winning!"); | |
} else { | |
jQuery(this).append('<td style="background-color: red; border: 1px solid silver">LOSE</td>'); | |
console.log("Losing!"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment