Removes items located outside a given region, as specified by editing the list in the code
当前为
// ==UserScript==
// @name BC Auction - Browse by Location - bcauction.ca
// @description Removes items located outside a given region, as specified by editing the list in the code
// @version 0.9
// @author mica
// @namespace greasyfork.org/users/12559
// @include https://www.bcauction.ca/open.dll/submitDocSearch*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @grant none
// ==/UserScript==
// List of known locations
// Remove the places you want to have shown (i.e. towns in your area)
// Keep the list comma separated, except for the last item
var places = [
'100 Mile House',
'Abbotsford',
'Aldergrove',
'Annacis Island',
'Armstrong',
'Ashcroft',
'Bella Coola',
'Bowron Lake Park',
'Burnaby',
'Campbell River',
'Castlegar',
'Clearwater',
'Coldstream',
'Coquitlam',
'Cranbrook',
'Dawson Creek',
'Delta',
'Duncan',
'Fort St. James',
'Fort St. John',
'Golden',
'Grand Forks',
'Hope',
'Kamloops',
'Kelowna',
'Kitimat',
'Lake Country',
'Langley',
'Lillooet',
'Lumby',
'Lytton',
'Masset',
'McBride',
'Merritt',
'Mission',
'Nanaimo',
'New Westminster',
'Nelson',
'Osoyoos',
'Parksville',
'Peachland',
'Penticton',
'Port Alberni',
'Prince George',
'Princeton',
'Qualicum Bay',
'Quesnel',
'Revelstoke',
'Richmond',
'Salmon Arm',
'Sechelt',
'Sparwood',
'Squamish',
'Summerland',
'Surrey',
'Telkwa',
'Terrace',
'Tumbler Ridge',
'Vancouver',
'Vanderhoof',
'Vernon',
'Victoria',
'Williams Lake'
];
var elems = 'td[width="75"] > table > tbody > tr > td';
$(elems).each(function(i, elem) {
$(places).each(function(i, place) {
if ($(elem).text().toUpperCase().includes(place.toUpperCase())) {
$(elem).parents().eq('4').next().addBack().remove();
}
});
});
// $('a.searchResultsBodyLink').each(function() {
// $(this).attr('href', $(this).attr('href').replace('javascript:openWindow(\'','').replace('\')','') );
// $(this).attr('target','_blank');
// });