2024-01-03, update for ibon.
							parent
							
								
									cb844b1a7a
								
							
						
					
					
						commit
						14941fae66
					
				| 
						 | 
					@ -54,7 +54,7 @@ import webbrowser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import chromedriver_autoinstaller
 | 
					import chromedriver_autoinstaller
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_APP_VERSION = "MaxBot (2024.01.02)"
 | 
					CONST_APP_VERSION = "MaxBot (2024.01.03)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
 | 
					CONST_MAXBOT_CONFIG_FILE = "settings.json"
 | 
				
			||||||
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
 | 
					CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@ import sys
 | 
				
			||||||
import threading
 | 
					import threading
 | 
				
			||||||
import webbrowser
 | 
					import webbrowser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_APP_VERSION = "MaxBot (2024.01.02)"
 | 
					CONST_APP_VERSION = "MaxBot (2024.01.03)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
 | 
					CONST_MAXBOT_LAUNCHER_FILE = "config_launcher.json"
 | 
				
			||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
 | 
					CONST_MAXBOT_CONFIG_FILE = "settings.json"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,7 +34,7 @@ import ssl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ssl._create_default_https_context = ssl._create_unverified_context
 | 
					ssl._create_default_https_context = ssl._create_unverified_context
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_APP_VERSION = "MaxBot (2024.01.02)"
 | 
					CONST_APP_VERSION = "MaxBot (2024.01.03)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_MAXBOT_CONFIG_FILE = "settings.json"
 | 
					CONST_MAXBOT_CONFIG_FILE = "settings.json"
 | 
				
			||||||
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
 | 
					CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +27,7 @@ import pyperclip
 | 
				
			||||||
import tornado
 | 
					import tornado
 | 
				
			||||||
from tornado.web import Application
 | 
					from tornado.web import Application
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_APP_VERSION = "MaxBot (2024.01.02)"
 | 
					CONST_APP_VERSION = "MaxBot (2024.01.03)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt"
 | 
					CONST_MAXBOT_QUESTION_FILE = "MAXBOT_QUESTION.txt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,56 @@
 | 
				
			||||||
 | 
					const storage = chrome.storage.local;
 | 
				
			||||||
 | 
					var settings = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// price row.
 | 
					// price row.
 | 
				
			||||||
$("table > tbody > tr.disabled").remove();
 | 
					$("table > tbody > tr.disabled").remove();
 | 
				
			||||||
$("table > tbody > tr.sold-out").remove();
 | 
					$("table > tbody > tr.sold-out").remove();
 | 
				
			||||||
$("div.map > div > img").remove();
 | 
					$("div.map > div > img").remove();
 | 
				
			||||||
$("footer").remove();
 | 
					$("footer").remove();
 | 
				
			||||||
 | 
					let $tr=$("table > tbody > tr[onclick]");
 | 
				
			||||||
 | 
					//console.log("$tr.length:"+$tr.length);
 | 
				
			||||||
 | 
					if($tr.length==1) {
 | 
				
			||||||
 | 
						//console.log("$tr.html:"+$tr.html());
 | 
				
			||||||
 | 
						$tr.click();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function ibon_area_main() {
 | 
				
			||||||
 | 
						let reload=false;
 | 
				
			||||||
 | 
						let $tr=$("table > tbody > tr[onclick]");
 | 
				
			||||||
 | 
						if($tr.length==0) {
 | 
				
			||||||
 | 
							reload=true;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					    if(reload) {
 | 
				
			||||||
 | 
					        let auto_reload_page_interval = 0.0;
 | 
				
			||||||
 | 
					        if(settings) {
 | 
				
			||||||
 | 
					            auto_reload_page_interval = settings.advanced.auto_reload_page_interval;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if(auto_reload_page_interval == 0) {
 | 
				
			||||||
 | 
					            //console.log('Start to reload now.');
 | 
				
			||||||
 | 
					            location.reload();
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            console.log('We are going to reload after few seconeds.');
 | 
				
			||||||
 | 
					            setTimeout(function () {
 | 
				
			||||||
 | 
					                location.reload();
 | 
				
			||||||
 | 
					            }, auto_reload_page_interval * 1000);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					storage.get('settings', function (items)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (items.settings)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        settings = items.settings;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					storage.get('status', function (items)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (items.status && items.status=='ON')
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        ibon_area_main();
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        console.log('no status found');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,4 @@
 | 
				
			||||||
const storage = chrome.storage.local;
 | 
					const storage = chrome.storage.local;
 | 
				
			||||||
 | 
					 | 
				
			||||||
var settings = null;
 | 
					var settings = null;
 | 
				
			||||||
var myInterval = null;
 | 
					var myInterval = null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -221,5 +221,5 @@
 | 
				
			||||||
      "js" : [ "jquery.min.js", "js/common.js", "js/kktix_registrations_reload.js" ]
 | 
					      "js" : [ "jquery.min.js", "js/common.js", "js/kktix_registrations_reload.js" ]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "version": "1.0.2"
 | 
					  "version": "1.0.3"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue