您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
用來按照您設定的關鍵字過濾隱藏掉旋轉拍賣商品列表内的特定商品
当前为
// ==UserScript== // @name Carousell fliter // @namespace [email protected] // @description 用來按照您設定的關鍵字過濾隱藏掉旋轉拍賣商品列表内的特定商品 // @version 1.6 // @icon https://hr4.com/careers/driveautogroup/images/path-parts.png // @author [email protected] // @create 2022-10-10 // @match *://tw.carousell.com/ // @match *://tw.carousell.com/* // @exclude *://tw.carousell.com/p/* // @exclude *://tw.carousell.com/login/* // @exclude *://*.exclude.com/live_chat* // @grant GM_getValue // @grant GM_setValue // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js // @supportURL http://mailto:[email protected] // @grant GM_xmlhttpRequest // @connect * // @run-at document-end // ==/UserScript== //https://www.youtube.com/user/see7di/playlists?view=1 //https://tw.carousell.com/search/?addRecent=false&canChangeKeyword=false&includeSuggestions=false&price_end=222&price_start=1&sc=0a0208301a0408bce9652a210a05707269636522160a0909000000000000f03f1209090000000000c06b4078012a140a0b636f6c6c656374696f6e7312030a013078012a210a05707269636522160a0909000000000000f03f1209090000000000c06b4078013204080378013a02180742060801100118004a0620012801400150005a020801&searchId=wkcMW7&searchType=all&sort_by=3 (function() { "use strict"; var cfg={ i0:0, i1:0, i2:0, version:"1.6", str_list:"", arr_list:[], debug:false, str_demo:"褲|帽|襪|裙|袖|恤|衫|鞋|恤|髮|童裝|足膜|長洋|大衣|上衣|香水|和服|男裝|女裝|短褲|秋裝|蜜粉|卸妝", }; window.setTimeout(function(){ //列表 no loop $("iframe").remove(); $("footer",$("#main")).remove(); $("body").prepend("<div style='left:"+parseInt(screen.width-200)+"px;bottom:1px;width:180px;color:white;font-size:12px;background-color:#2c2c2d;font:caption;padding:5px;border-radius:5px;box-shadow:2px 2px 4px #fff;z-index:9999;position:fixed'><div><input type='button' value='點擊此處開始過濾' id='carousell_btn' style='font-weight:bold;font-size:16px;border-radius:3px;border:1px solid #000;cursor:pointer;'><span id='carousell_ico' style='cursor:pointer;padding-left:7px'>▼</span><p id='carousell_memo' style='margin:9px 0;font-size:12px;'>Ver: "+cfg.version+"</p><textarea id='carousell_keys' placeholder='要過濾的關鍵詞,用|分隔' style='height:400px;width:100%;background-color:#eee;padding:0;border:1px solid #ddd;display:none'></textarea></div></div>"); $("#carousell_btn").bind("click",function(){ guoLv(); }); $("#carousell_ico").bind("click",function(){ editKeys() }); $("#carousell_keys").bind("blur",function(){ saveKeys(); }); cfg.str_list=$.trim(GM_getValue("black_list")); if(cfg.str_list==""){ cfg.str_list=cfg.str_demo; GM_setValue("black_list",cfg.str_list); } $("#carousell_keys").val(cfg.str_list); if(cfg.debug==true){ console.log(cfg.str_list); } },1500); var guoLv=function(){ //Fliter cfg.i0++; cfg.i1=0; cfg.i2=0; cfg.arr_list=getArray(cfg.str_list); if(cfg.debug==true){ console.log(cfg.arr_list); } $('p[style^="--max"]',$("div[data-testid]")).attr("style","border:2px solid blue;--max-line:2;").each(function(i){ cfg.i1++; var title=$(this).text(); for(var i2 in cfg.arr_list){ if(title.indexOf(cfg.arr_list[i2])!=-1){ //$(this).parent().parent().parent().attr("style","border:3px solid blue"); cfg.i2++; $(this).parent().parent().parent().parent().remove(); break; } } }); $("#carousell_btn").prop("disabled",true); $("#carousell_memo").html("第"+cfg.i0+"次過濾,此次找到"+cfg.i1+"個商品<br>其中"+cfg.i2+"個已被過濾掉!"); if(cfg.i0 % 5 == 0){ $("#carousell_btn").prop("disabled",false); }else{ window.setTimeout(function(){ //no loop $('button:contains("Show more results")').click(); window.setTimeout(function(){ guoLv(); },2000); },3000); } } var editKeys=function(){ if($("#carousell_ico").text()=="▼"){ $("#carousell_ico").text("▲"); $("#carousell_keys").css({"display":""}); }else{ $("#carousell_ico").text("▼"); $("#carousell_keys").css({"display":"none"}); } } var saveKeys=function(){ //Save the keywords cfg.str_list=$.trim($("#carousell_keys").val()); GM_setValue("black_list",cfg.str_list); cfg.arr_list=getArray(cfg.str_list); $("#carousell_ico").text("▼"); $("#carousell_keys").css({"display":"none"}); } var getArray=function(string){ //Get array from string if (!string) return []; return string.split("|").map(v => v.trim()).filter(v => v.length); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址