translations support for mobile version
parent
ed0551c274
commit
7c33dbd479
@ -0,0 +1,48 @@
|
||||
function debug(msg) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
function setCookie(name, value, lifetime, path, domain, secure) {
|
||||
|
||||
var d = false;
|
||||
|
||||
if (lifetime) {
|
||||
d = new Date();
|
||||
d.setTime(d.getTime() + (lifetime * 1000));
|
||||
}
|
||||
|
||||
debug("setCookie: " + name + " => " + value + ": " + d);
|
||||
|
||||
int_setCookie(name, value, d, path, domain, secure);
|
||||
|
||||
}
|
||||
|
||||
function int_setCookie(name, value, expires, path, domain, secure) {
|
||||
document.cookie= name + "=" + escape(value) +
|
||||
((expires) ? "; expires=" + expires.toGMTString() : "") +
|
||||
((path) ? "; path=" + path : "") +
|
||||
((domain) ? "; domain=" + domain : "") +
|
||||
((secure) ? "; secure" : "");
|
||||
}
|
||||
|
||||
function exception_error(location, e, silent) {
|
||||
var msg;
|
||||
|
||||
if (e.fileName) {
|
||||
var base_fname = e.fileName.substring(e.fileName.lastIndexOf("/") + 1);
|
||||
|
||||
msg = "Exception: " + e.name + ", " + e.message +
|
||||
"\nFunction: " + location + "()" +
|
||||
"\nLocation: " + base_fname + ":" + e.lineNumber;
|
||||
|
||||
} else if (e.description) {
|
||||
msg = "Exception: " + e.description + "\nFunction: " + location + "()";
|
||||
} else {
|
||||
msg = "Exception: " + e + "\nFunction: " + location + "()";
|
||||
}
|
||||
|
||||
if (!silent) {
|
||||
alert(msg);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue