// ==UserScript== // @name TradeMe Lifestyle Real Estate filter // @namespace http://tw/ // @version 1.0 // @description Extension of the TradeMe Real estate filter to filter out listings baased on price per HA and definite prices only in Real Estate search results. Works in List view only // @include /http://www\.trademe\.co\.nz/[Bb]rowse/[Cc]ategory[Aa]ttribute[Ss]earch[Rr]esults.aspx.*/ // tried using params to select only real estate search results but there are too many variants // @include http://www.trademe.co.nz/property/* // @include http://www.trademe.co.nz/browse/property/regionlistings.aspx* // @include http://www.trademe.co.nz/members/listings.aspx* // @grant none // @copyright public domain // @downloadURL none // ==/UserScript== //----------------------------------------------------------------------------------------------- // Listings with a "price" that matches this pattern will be hidden var KILL_PATTERN = /(Price by negotiation)|(Enquiries Over)|(To be auctioned)|(Tender)|(Deadline private treaty)/i; // Listing that cost more than MAX_PRICE_PER_HA per HA will be hidden. // (This is roughly 5% gross annual return for sheep, with no wool (a meat breed like Dorpers)) var MAX_PRICE_PER_HA = 17500; // Some alternative kill patterns below, remove the "//" at the start of the line add a "//" before the other patterns to use them // Any price that doesn't contain a dollar sign. This will allow "Enquiries over $nnnn" but block all auctions, tenders etc. // var KILL_PATTERN = /^[^\$]*$/; // Only kill "Price by negotiation" // var KILL_PATTERN = /Price by negotiation/i; //----------------------------------------------------------------------------------------------- // v1.1.2 Trademe changed class for listing price // v1.1, v1.1.1 Greasemonkey 2.0 changes // v1.0 work with "Properties from this office" page and category listing pages var KILLED_LISTING_STYLES = ".killedlisting {background-color:#eeeeee !important; color: #999999 !important;}\ .hiddenlisting {display:none !important;}"; function addStyle(style) { $("