Fixing code little bit

This commit is contained in:
Petja 2014-03-06 09:17:01 +02:00
parent d56bfbc5e8
commit 1cf1956386

View file

@ -53,7 +53,7 @@
}); });
// Check is it possible to use manual mode // Check is it possible to use manual mode
if(GET.ret.trim() !== "" && GET.ret.indexOf("http") == -1){ if(GET.ret == "" || GET.ret == void(0) || GET.ret.indexOf("http") == -1){
$("#man").hide(); $("#man").hide();
} }
@ -62,8 +62,8 @@
$("#info").hide(); $("#info").hide();
$("#error").hide(); $("#error").hide();
$("#installed").show(); $("#installed").show();
var url = location; var url = location.href;
if(GET.length < 1) url = url + "?"; if(url.indexOf("?") == -1) url = url + "?";
url = url + "&installed=1"; url = url + "&installed=1";
$("#installed a").attr("href",url); $("#installed a").attr("href",url);
}); });
@ -72,7 +72,7 @@
$("#man").click(function(e){ $("#man").click(function(e){
e.preventDefault(); e.preventDefault();
var man = prompt("Please type barcode below"); var man = prompt("Please type barcode below");
if(man !== "null"){ if(man){
var url = GET.ret; var url = GET.ret;
if(url.indexOf("?") == -1) url = url + "?"; if(url.indexOf("?") == -1) url = url + "?";
url = url + "&{CODE}=" + man; url = url + "&{CODE}=" + man;