blob: 6a65882160eac4db590a6a6fd71fc46e57816712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
function handleRequest(request, response) {
response.setHeader("Content-Type", "text/html");
response.setHeader("Cache-Control", "no-cache");
response.write("<body onload='");
if (!request.hasHeader("Referer")) {
response.write("window.parent.onloadCount++;");
}
if (request.queryString == "newwindow") {
response.write(
"if (window.opener) { window.opener.parent.onloadCount++; window.opener.parent.doNextStep(); }"
);
response.write("if (!window.opener) window.close();");
response.write("'>");
} else {
response.write("window.parent.doNextStep();'>");
}
response.write(request.method + " " + Date.now());
response.write("</body>");
}
|