/usr/share/tntnet/calcajax_js.js is in tntnet-demos 2.2.1-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | function getRequest()
{
try { return new XMLHttpRequest(); } catch (e) { }
try { return new ActiveXObject("Msxml2.XMLHttp"); } catch (e) { }
try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { }
return null;
}
function ajaxGet(url, fn, failFn)
{
request = getRequest();
request.open("GET", url);
request.onreadystatechange = function () {
if (request.readyState == 4)
{
if (request.status == 200)
fn(request);
else if (failFn != null)
failFn(request);
}
}
request.send(null);
}
|