SiteCoach Object
The SiteCoach object controls the environment of the Content Filter plugin.
Members Table
The following table lists the members provided by the SiteCoach object.
Remarks
This object is available through the collection Plugins.
Use the SiteCoach object to enable or disable blocking web pages or to get settings of this plugin.
Note that the path of a file using SiteKiosk objects must be allowed in the
SiteKiosk configuration (Security -> Access -> URL's With Script Permission)
if it is not a browser skin file.
Examples
The following example shows information about the Content Filter plugin.
<html>
<body>
<table border="0" bgcolor="#ebebeb" width="600" cellspacing="5"
cellpadding="5" style="font-family:verdana;font-size:8pt;"
align="center">
<tr><td bgcolor="f8f8f8">
Try to open the forbidden URL when the Content Filter [Plug-In]
filter is activated.
</td></tr>
<tr><td style="font-family:verdana;font-size:8pt;">
<pre>
<SCRIPT TYPE="text/javascript">
window.external.InitScriptInterface();
if (SiteKiosk.Plugins('SiteCoach').Enabled)
{
coachstatus = "Content Filter Plugin is active";
if (SiteKiosk.Plugins("SiteCoach").FilterState)
coachfilterstatus = "activated";
else coachfilterstatus = "deactivated";
}
else
{
coachstatus = "Content Filter Plugin has not been configured";
coachfilterstatus = "-";
}
document.writeln("Status: " + coachstatus);
document.write("<span id='id_scoachfilter'>Filter: " +
coachfilterstatus + "</span>");
function adswitch()
{
if (SiteKiosk.Plugins('SiteCoach').Enabled)
{
SiteKiosk.Plugins("SiteCoach").FilterState =
!SiteKiosk.Plugins("SiteCoach").FilterState;
} else alert("Content Filter Plugin has not been configured");
}
function openurl()
{
window.open("http://www.sex.com");
}
SiteKiosk.Plugins("SiteCoach").OnFilterStateChanged = OFSChanged;
function OFSChanged()
{
if (SiteKiosk.Plugins("SiteCoach").FilterState)
coachfilterstatus = "activated";
else coachfilterstatus = "deactivated";
id_scoachfilter.innerHTML = "Filter: " + coachfilterstatus;
}
</SCRIPT>
</pre>
</td></tr>
</table>
<br><br>
<div align="center">
<a href="javascript:adswitch()">Activate / Deactivate</a>
<a href="javascript:openurl()">Open URL</a>
</div>
</body>
</html>
|
Applies to
SiteKiosk v5.0 (and later versions).
Back to top