wish.com Tweaks

Filtering by max price, autoload items

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name      wish.com Tweaks
// @namespace  [email protected]
// @version    1.3
// @description  Filtering by max price, autoload items
// @match      https://www.wish.com/*
// @copyright  [email protected]
// ==/UserScript==




$(document).ready(function() {   
    
    if ($("#nav-search").length > 0){
        
        $("#header-left").after('<div id="wish_tweaks_config" style="float: left; margin-top: 18px;"><p style="color: black;float: left;"> Autolad Products:</p><input type="checkbox" id="wtc_autoload_items" name="autoload_items" value="value" style="float: left;"><p style="color: black;float: left;">Max Price: </p><input id="wtc_max_price" type="text" maxlength="4" style="width: 30px;width: 2;margin-left: 5px;margin-top: 0px;"></div>');
        
        $("#wtc_max_price").keydown(function (e) {
            if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
                (e.keyCode == 65 && e.ctrlKey === true) || 
                (e.keyCode >= 35 && e.keyCode <= 39)) {
                return;
            }
            if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
                e.preventDefault();
            }
        });
        
        setInterval(function(){
            
            if($("#wtc_max_price").val() == ''){                
            }else{
                
                window.max_price = parseInt($("#wtc_max_price").val());
                                
                var items = $(".actual-price");
                
                $.each( items, function() {    
                    
                    if($(this).text().replace(/\D/g,'') > window.max_price){                                       
                        $(this).parent().parent().parent().parent().remove();                                       
                    }
                    
                });    
                
            }
            
            if($("#wtc_autoload_items").is(':checked')){
                $("#feed-more-btn").click();        
            }
            
        }, 500);
        
    }    
    
});