allow kktix redirect with tracker url, ex: fbid

master
Your Name 2024-01-26 16:53:49 +08:00
parent 861996afc3
commit 0f35ce7ca1
2 changed files with 6 additions and 3 deletions

View File

@ -6,12 +6,15 @@ $("footer").remove();
function kktix_event_redirect() function kktix_event_redirect()
{ {
const currentUrl = window.location.href; const currentUrl = window.location.href;
const event_code = currentUrl.split('/')[4]; let event_code = currentUrl.split('/')[4];
if(event_code.indexOf('?') > -1) {
event_code = event_code.split('?')[0];
}
//console.log(currentUrl); //console.log(currentUrl);
//console.log(event_code); //console.log(event_code);
if(event_code){ if(event_code){
let button_count = $("div.tickets > a.btn-point").length; let button_count = $("div.tickets > a.btn-point").length;
console.log("length:"+button_count); //console.log("length:"+button_count);
if (button_count == 1) { if (button_count == 1) {
let new_url = "https://kktix.com/events/"+ event_code +"/registrations/new"; let new_url = "https://kktix.com/events/"+ event_code +"/registrations/new";
location.href=new_url; location.href=new_url;

View File

@ -380,5 +380,5 @@
] ]
} }
], ],
"version": "1.0.7" "version": "1.0.8"
} }