scone.accesstracking2
Class JavaScriptAdder
java.lang.Object
HttpEditor
scone.proxy.HtmlTokenEditor
scone.accesstracking2.JavaScriptAdder
public class JavaScriptAdder
- extends HtmlTokenEditor
Adds line in header to get JavaScript code from AccessTrackingMeg, which tracks user actions.
The following Code is inserted if the page ist not the head of a frameset:
<SCRIPT Language='JavaScript1.2' SRC='http://tracking.scone.de/_id123'></SCRIPT> where 123 is the nodeId
In case of a frameset a special piece of JavaScript code is inserted instead. This piece tests if
the window already has a name. If not, a name is generated. That is necessary if a browser
window starts with a frameset.
The following Code is inserted in case of a frameset:
<SCRIPT type='text/javascript'>
<!--
if (!window.name) { window.name = 'SCONE'+_scone_start_time+Math.floor(Math.random()*10000)};
//-->
</SCRIPT>
- Author:
- Harald Weinreich, Volkert Buchmann, Torsten Hass
Field Summary |
static java.lang.String |
COPYRIGHT
|
Method Summary |
void |
handleRequest(SconePipe pipe)
tries to add the preamble:
before </head>-Tag
before <body>-Tag
before <frameset>-Tag
before heading
before table
before link (<A> or <AREA>-Tag
before image
before form
before preformatted text
In case of a frameset a special JavaScript code is added to generate a window name if
the window has none. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
JavaScriptAdder
public JavaScriptAdder()
handleRequest
public void handleRequest(SconePipe pipe)
- tries to add the preamble:
- before </head>-Tag
- before <body>-Tag
- before <frameset>-Tag
- before heading
- before table
- before link (<A> or <AREA>-Tag
- before image
- before form
- before preformatted text
In case of a frameset a special JavaScript code is added to generate a window name if
the window has none.
- Overrides:
handleRequest
in class HtmlTokenEditor