BC Auction - Browse by Location - bcauction.ca

You must edit the code to remove the locations that you want to see!

目前為 2022-01-16 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         BC Auction - Browse by Location - bcauction.ca
// @description  You must edit the code to remove the locations that you want to see!
// @version      1.1
// @author       mica
// @namespace    greasyfork.org/users/12559
// @include      https://www.bcauction.ca/open.dll/submitDocSearch*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @license      MIT
// ==/UserScript==

// Remove the 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',
    'Bridge River',
    'Burnaby',
    'Campbell River',
    'Castlegar',
    'Chemainus',
    'Clearwater',
    'Coldstream',
    'Coquitlam',
    'Courtenay',
    'Cranbrook',
    'Dawson Creek',
    'Delta',
    'Duncan',
    'Fort St. James',
    'Fort St. John',
    'Golden',
    'Grand Forks',
    'Hope',
    'Kamloops',
    'Kelowna',
    'Kitimat',
    'Lake Country',
    'Ladysmith',
    'Langley',
    'Lillooet',
    'Lumby',
    'Lytton',
    'Masset',
    'McBride',
    'Merritt',
    'Mission',
    'Nanaimo',
    'New Westminster',
    'Nelson',
    'North Cowichan',
    '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();
        }
    });
});