BC Auction - Browse by Location

Removes items located outside a given region, as specified by editing the list in the code

当前为 2019-05-02 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        BC Auction - Browse by Location
// @description Removes items located outside a given region, as specified by editing the list in the code
// @version     0.3
// @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 = [
    'Abbotsford',
    'Armstrong',
    'Bowron Lake Park',
    'Burnaby',
    'Campbell River',
    'Castlegar',
    'Coquitlam',
    'Cranbrook',
    'Dawson Creek',
    'Delta',
    'Fort St. John',
    'Golden',
    'Grand Forks',
    'Hope',
    'Kamloops',
    'Kelowna',
    'Kitimat',
    'Langley',
    'Lillooet',
    'McBride',
    'Merritt',
    'Nanaimo',
    'Nelson',
    'Parksville',
    'Peachland',
    'Penticton',
    'Port Alberni',
    'Prince George',
    'Princeton',
    'Quesnel',
    'Revelstoke',
    'Richmond',
    'Salmon Arm',
    'Sechelt',
    'Sparwood',
    'Squamish',
    'Surrey',
    'Telkwa',
    'Terrace',
    'Tumbler Ridge',
    'Vancouver',
    '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().includes(place)) {
            $(elem).parents().eq('4').next().addBack().remove();
        }
    });
});