From 715377f835cac81859a8825d69b50334380d31a9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 11 Apr 2024 18:09:49 +0800 Subject: [PATCH] auto press submit for cityline --- .../js/cityline_performance.js | 33 +++++++++++++++++++ webdriver/Maxbotplus_1.0.0/manifest.json | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js b/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js index 9951b46..c42825d 100644 --- a/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js +++ b/webdriver/Maxbotplus_1.0.0/js/cityline_performance.js @@ -1,6 +1,34 @@ const storage = chrome.storage.local; var settings = null; +function cityline_clean_exclude(settings) +{ + let exclude_keyword_array = []; + if(settings) { + if(settings.keyword_exclude.length > 0) { + if(settings.keyword_exclude != '""') { + exclude_keyword_array = JSON.parse('[' + settings.keyword_exclude +']'); + } + } + } + + let query_string = "div.price > div.form-check"; + for (let i = 0; i < exclude_keyword_array.length; i++) { + $(query_string).each(function () + { + let html_text=$(this).text(); + let is_match_keyword=false; + if(html_text.indexOf(exclude_keyword_array[i])>-1) { + is_match_keyword=true; + } + if(is_match_keyword) { + $(this).remove(); + } + } + ); + } +} + function cityline_area_keyword(settings) { let area_keyword_array = []; @@ -60,6 +88,7 @@ function cityline_area_keyword(settings) function cityline_performance() { + cityline_clean_exclude(settings); //console.log("cityline_performance"); if(settings) { cityline_area_keyword(settings); @@ -71,6 +100,10 @@ function cityline_performance() $(this).click(); }); } + + if($("#ticketType0").val()+"" != "0") { + $('#expressPurchaseBtn').click(); + } } setTimeout(() => { diff --git a/webdriver/Maxbotplus_1.0.0/manifest.json b/webdriver/Maxbotplus_1.0.0/manifest.json index 0c8a9cd..d970e7b 100644 --- a/webdriver/Maxbotplus_1.0.0/manifest.json +++ b/webdriver/Maxbotplus_1.0.0/manifest.json @@ -432,5 +432,5 @@ ] } ], - "version": "1.0.21" + "version": "1.0.22" } \ No newline at end of file