您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Filtering by max price, autoload items
当前为
- // ==UserScript==
- // @name wish.com Tweaks
- // @namespace obscenelysad@gmail.com
- // @version 1.2
- // @description Filtering by max price, autoload items
- // @match https://www.wish.com/*
- // @copyright obscenelysad@gmail.com
- // ==/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() == ''){
- window.max_price = 33;
- }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);
- }
- });