add try catch
This commit is contained in:
@@ -35,7 +35,9 @@
|
|||||||
$("#send").click(function(){
|
$("#send").click(function(){
|
||||||
data = $("#ins").val();
|
data = $("#ins").val();
|
||||||
if(data != ""){
|
if(data != ""){
|
||||||
umami.trackEvent('Admin send chat message', { type: 'chatadminmessage', code: kod});
|
try{
|
||||||
|
umami.trackEvent('Admin send chat message', { type: 'chatadminmessage', code: kod});
|
||||||
|
} catch(e) {}
|
||||||
$.post("index.php?chat=1&send=1",
|
$.post("index.php?chat=1&send=1",
|
||||||
{
|
{
|
||||||
text: data
|
text: data
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
function SetLang(lang) {
|
function SetLang(lang) {
|
||||||
umami.trackEvent('Language changed', { type: 'lang', lang: lang });
|
try{
|
||||||
|
umami.trackEvent('Language changed', { type: 'lang', lang: lang });
|
||||||
|
} catch(e) {}
|
||||||
$.get("index.php?setLang=" + lang, function(data, status){
|
$.get("index.php?setLang=" + lang, function(data, status){
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
|
@@ -39,7 +39,9 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if(data == "admin"){
|
else if(data == "admin"){
|
||||||
umami.trackEvent('Admin login', { type: 'adminlogin', code: kod });
|
try{
|
||||||
|
umami.trackEvent('Admin login', { type: 'adminlogin', code: kod });
|
||||||
|
} catch(e) {}
|
||||||
$.post("index.php",
|
$.post("index.php",
|
||||||
{
|
{
|
||||||
kod: kod,
|
kod: kod,
|
||||||
@@ -51,13 +53,17 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
umami.trackEvent('Bad code', { type: 'badcode', code: kod });
|
try{
|
||||||
|
umami.trackEvent('Bad code', { type: 'badcode', code: kod });
|
||||||
|
} catch(e) {}
|
||||||
$("#error").fadeIn();
|
$("#error").fadeIn();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$("#back").click(function() {
|
$("#back").click(function() {
|
||||||
umami.trackEvent('Back button', { type: 'loginback' });
|
try{
|
||||||
|
umami.trackEvent('Back button', { type: 'loginback' });
|
||||||
|
} catch(e) {}
|
||||||
$("#secondQuestion").fadeOut("slow", function(){
|
$("#secondQuestion").fadeOut("slow", function(){
|
||||||
$("#firstQuestion").fadeIn("slow", function(){
|
$("#firstQuestion").fadeIn("slow", function(){
|
||||||
$("#kod").focus();
|
$("#kod").focus();
|
||||||
@@ -67,7 +73,9 @@
|
|||||||
$("#send").click(function() {
|
$("#send").click(function() {
|
||||||
inic = $("#ini").val();
|
inic = $("#ini").val();
|
||||||
listeners = $("#listeners").val();
|
listeners = $("#listeners").val();
|
||||||
umami.trackEvent('Normal login ', { type: 'login', code: kod, listeners: listeners, initials: inic });
|
try{
|
||||||
|
umami.trackEvent('Normal login ', { type: 'login', code: kod, listeners: listeners, initials: inic });
|
||||||
|
} catch(e) {}
|
||||||
$.post("index.php",
|
$.post("index.php",
|
||||||
{
|
{
|
||||||
kod: kod,
|
kod: kod,
|
||||||
|
@@ -46,7 +46,9 @@
|
|||||||
data = $("#ins").val();
|
data = $("#ins").val();
|
||||||
Getc();
|
Getc();
|
||||||
if(data != ""){
|
if(data != ""){
|
||||||
umami.trackEvent('Send chat message', { type: 'chatmessage', code: kod});
|
try{
|
||||||
|
umami.trackEvent('Send chat message', { type: 'chatmessage', code: kod});
|
||||||
|
} catch(e) {}
|
||||||
$.post("index.php?chat=1&send=1",
|
$.post("index.php?chat=1&send=1",
|
||||||
{
|
{
|
||||||
text: data
|
text: data
|
||||||
|
Reference in New Issue
Block a user