1999-08-03 04:06:32 +04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Cookies</title>
|
|
|
|
<script>
|
1999-06-20 01:08:33 +04:00
|
|
|
|
|
|
|
/* for xpconnect */
|
|
|
|
var cookieviewer =
|
|
|
|
Components.classes
|
|
|
|
["component://netscape/cookieviewer/cookieviewer-world"].createInstance();
|
|
|
|
cookieviewer = cookieviewer.QueryInterface(Components.interfaces.nsICookieViewer);
|
|
|
|
|
|
|
|
function DoGetCookieList()
|
|
|
|
{
|
|
|
|
return cookieviewer.GetCookieValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
function DoGetPermissionList()
|
|
|
|
{
|
|
|
|
return cookieviewer.GetPermissionValue();
|
|
|
|
}
|
|
|
|
|
|
|
|
function DoSave(value)
|
|
|
|
{
|
|
|
|
cookieviewer.SetValue(value, window);
|
|
|
|
}
|
|
|
|
/* end of xpconnect stuff */
|
|
|
|
|
|
|
|
index_frame = 0;
|
|
|
|
title_frame = 1;
|
|
|
|
spacer1_frame = 2;
|
|
|
|
list_frame = 3;
|
|
|
|
spacer2_frame = 4;
|
|
|
|
prop_frame = 5;
|
|
|
|
spacer3_frame = 6;
|
|
|
|
button_frame = 7;
|
|
|
|
|
|
|
|
var cookie_mode;
|
|
|
|
var cookieList = [];
|
|
|
|
var permissionList = [];
|
|
|
|
deleted_cookies = new Array;
|
|
|
|
deleted_permissions = new Array;
|
|
|
|
|
|
|
|
function DeleteItemSelected() {
|
|
|
|
if (cookie_mode == 0) {
|
|
|
|
DeleteCookieSelected();
|
|
|
|
} else if (cookie_mode == 1) {
|
|
|
|
DeletePermissionSelected();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function DeleteCookieSelected() {
|
|
|
|
selname = top.frames[list_frame].document.fSelectCookie.selname;
|
|
|
|
goneC = top.frames[button_frame].document.buttons.goneC;
|
|
|
|
var p;
|
|
|
|
var i;
|
|
|
|
for (i=selname.options.length; i>0; i--) {
|
|
|
|
if (selname.options[i-1].selected) {
|
|
|
|
selname.options[i-1].selected = 0;
|
|
|
|
goneC.value = goneC.value + selname.options[i-1].value + ",";
|
|
|
|
deleted_cookies[selname.options[i-1].value] = 1;
|
|
|
|
selname.remove(i-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
top.frames[prop_frame].document.open();
|
|
|
|
top.frames[prop_frame].document.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function DeletePermissionSelected() {
|
|
|
|
selname = top.frames[list_frame].document.fSelectPermission.selname;
|
|
|
|
goneP = top.frames[button_frame].document.buttons.goneP;
|
|
|
|
var p;
|
|
|
|
var i;
|
|
|
|
for (i=selname.options.length; i>0; i--) {
|
|
|
|
if (selname.options[i-1].selected) {
|
|
|
|
selname.options[i-1].selected = 0;
|
|
|
|
goneP.value = goneP.value + selname.options[i-1].value + ",";
|
|
|
|
deleted_permissions[selname.options[i-1].value] = 1;
|
|
|
|
selname.remove(i-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadCookies(){
|
|
|
|
cookie_mode = 0;
|
|
|
|
top.frames[index_frame].document.open();
|
|
|
|
top.frames[index_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<body bgcolor='#c0c0c0'>" +
|
|
|
|
"<table border='0' width='100%'>" +
|
|
|
|
"<tr>" +
|
|
|
|
"<td align='center' valign='middle' bgcolor='#ffffff'>" +
|
|
|
|
"<font size='2' color='#666666'>" +
|
|
|
|
"<b>View stored cookies</b>" +
|
|
|
|
"</font>" +
|
|
|
|
"</td>" +
|
|
|
|
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
|
|
|
"<a onclick='top.loadPermissions();' href=''>" +
|
|
|
|
"<font size='2'>View sites that can or cannot store cookies</font>" +
|
|
|
|
"</a>" +
|
|
|
|
"</td>" +
|
|
|
|
"</tr>" +
|
|
|
|
"</table>" +
|
|
|
|
"</body>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
top.frames[index_frame].document.close();
|
|
|
|
|
|
|
|
top.frames[title_frame].document.open();
|
|
|
|
top.frames[title_frame].document.write
|
|
|
|
(" Cookies stored on your system");
|
|
|
|
top.frames[title_frame].document.close();
|
|
|
|
|
|
|
|
top.frames[prop_frame].document.open();
|
|
|
|
top.frames[prop_frame].document.close();
|
|
|
|
|
|
|
|
loadCookiesList();
|
|
|
|
}
|
|
|
|
|
|
|
|
function ViewCookieSelected() {
|
|
|
|
index = 8*(top.frames[list_frame].document.fSelectCookie.selname.selectedIndex) + 1;
|
|
|
|
top.frames[prop_frame].document.open();
|
|
|
|
top.frames[prop_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<nobr><b>Name: </b>" + cookieList[index+1] + "</nobr><br/>" +
|
|
|
|
"<nobr><b>Value: </b>" + cookieList[index+2] + "</nobr><br/>" +
|
|
|
|
"<nobr><b>" + cookieList[index+3] + ": </b>" + cookieList[index+4] + "</nobr><br/>" +
|
|
|
|
"<nobr><b>Path: </b>" + cookieList[index+5] + "</nobr><br/>" +
|
|
|
|
"<nobr><b>Secure: </b>" + cookieList[index+6] + "</nobr><br/>" +
|
|
|
|
"<nobr><b>Expires: </b>" + cookieList[index+7] + "</nobr><br/>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
top.frames[prop_frame].document.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadCookiesList(){
|
|
|
|
top.frames[list_frame].document.open();
|
|
|
|
top.frames[list_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<form name='fSelectCookie'>" +
|
|
|
|
"<p>" +
|
1999-09-03 01:37:24 +04:00
|
|
|
"<b>site:cookie-name</b>" +
|
|
|
|
"<table border='0'>" +
|
1999-08-03 04:06:32 +04:00
|
|
|
"<tr>" +
|
|
|
|
"<td width='100%' valign='top'>" +
|
|
|
|
"<center>" +
|
|
|
|
"<p>" +
|
1999-09-03 01:37:24 +04:00
|
|
|
"<select name='selname' size='10' multiple='multiple' onchange='top.ViewCookieSelected();'>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
1999-08-03 08:55:11 +04:00
|
|
|
for (i=1; !(i>=cookieList.length); i+=8) {
|
1999-06-20 01:08:33 +04:00
|
|
|
if (!deleted_cookies[cookieList[i]]) {
|
|
|
|
top.frames[list_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<option value=" + cookieList[i] + ">" +
|
|
|
|
cookieList[i+4] + ":" + cookieList[i+1] +
|
|
|
|
"</option>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
top.frames[list_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"</select>" +
|
|
|
|
"</p>" +
|
|
|
|
"</center>" +
|
|
|
|
"</td>" +
|
|
|
|
"</tr>" +
|
|
|
|
"</table>" +
|
|
|
|
"</p>" +
|
|
|
|
"</form>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
top.frames[list_frame].document.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadPermissions(){
|
|
|
|
cookie_mode = 1;
|
|
|
|
top.frames[index_frame].document.open();
|
|
|
|
top.frames[index_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<body bgcolor='#c0c0c0'>" +
|
|
|
|
"<table border='0' width='100%'>" +
|
|
|
|
"<tr>" +
|
|
|
|
"<td align='center' valign='middle' bgcolor='#c0c0c0'>" +
|
|
|
|
"<a onclick='top.loadCookies();' href=''>" +
|
|
|
|
"<font size='2'>View stored cookies</font>" +
|
|
|
|
"</a>" +
|
|
|
|
"</td>" +
|
|
|
|
"<td align='center' valign='middle' bgcolor='#ffffff'>" +
|
|
|
|
"<font size='2' color='#666666'>" +
|
|
|
|
"<b>View sites that can or cannot store cookies</b>" +
|
|
|
|
"</font>" +
|
|
|
|
"</td>" +
|
|
|
|
"<td> </td>" +
|
|
|
|
"</tr>" +
|
|
|
|
"</table>" +
|
|
|
|
"</body>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
top.frames[index_frame].document.close();
|
|
|
|
|
|
|
|
top.frames[title_frame].document.open();
|
|
|
|
top.frames[title_frame].document.write
|
|
|
|
(" Sites that can(+) or cannot(-) store cookies");
|
|
|
|
top.frames[title_frame].document.close();
|
|
|
|
|
|
|
|
top.frames[prop_frame].document.open();
|
|
|
|
top.frames[prop_frame].document.close();
|
|
|
|
|
|
|
|
loadPermissionsList();
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadPermissionsList(){
|
|
|
|
top.frames[list_frame].document.open();
|
|
|
|
top.frames[list_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<form name='fSelectPermission'>" +
|
|
|
|
"<p>" +
|
1999-09-03 01:37:24 +04:00
|
|
|
"<table border='0'>" +
|
1999-08-03 04:06:32 +04:00
|
|
|
"<tr>" +
|
|
|
|
"<td width='100%' valign='top'>" +
|
|
|
|
"<center>" +
|
|
|
|
"<p>" +
|
1999-09-03 01:37:24 +04:00
|
|
|
"<select name='selname' size='10' multiple='multiple'> "
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
1999-08-04 00:37:18 +04:00
|
|
|
for (i=1; !(i>=permissionList.length); i+=2) {
|
1999-06-20 01:08:33 +04:00
|
|
|
if (!deleted_permissions[permissionList[i]]) {
|
|
|
|
top.frames[list_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<option value=" + permissionList[i] + ">" +
|
|
|
|
permissionList[i+1] +
|
|
|
|
"</option>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
top.frames[list_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"</select>" +
|
|
|
|
"</p>" +
|
|
|
|
"</center>" +
|
|
|
|
"</td>" +
|
|
|
|
"</tr>" +
|
|
|
|
"</table>" +
|
|
|
|
"</p>" +
|
|
|
|
"</form>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
top.frames[list_frame].document.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadButtons(){
|
|
|
|
top.frames[button_frame].document.open();
|
|
|
|
top.frames[button_frame].document.write(
|
1999-08-03 04:06:32 +04:00
|
|
|
"<form name='buttons'>" +
|
|
|
|
"<br/>" +
|
1999-06-20 01:08:33 +04:00
|
|
|
" " +
|
1999-08-03 04:06:32 +04:00
|
|
|
"<button onclick='top.DeleteItemSelected();'>Remove</button>" +
|
|
|
|
"<div align='right'>" +
|
|
|
|
"<button onclick='parent.Save();'>OK</button>" +
|
1999-06-20 01:08:33 +04:00
|
|
|
" " +
|
1999-08-03 04:06:32 +04:00
|
|
|
"<button onclick='parent.Cancel();'>Cancel</button>" +
|
|
|
|
"</div>" +
|
|
|
|
"<input type='hidden' name='goneC' value='' size='-1'/>" +
|
|
|
|
"<input type='hidden' name='goneP' value='' size='-1'/>" +
|
|
|
|
"<input type='hidden' name='cookieList' value='' size='-1'/>" +
|
|
|
|
"<input type='hidden' name='permissionList' value='' size='-1'/>" +
|
|
|
|
"</form>"
|
1999-06-20 01:08:33 +04:00
|
|
|
);
|
|
|
|
top.frames[button_frame].document.close();
|
|
|
|
}
|
|
|
|
|
|
|
|
function loadFrames(){
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The cookieList is a sequence of items separated by the BREAK character. These
|
|
|
|
* items are:
|
|
|
|
* empty
|
|
|
|
* number for first cookie
|
|
|
|
* name for first cookie
|
|
|
|
* value for first cookie
|
|
|
|
* domain indicator ("Domain" or "Host") for first cookie
|
|
|
|
* domain or host name for first cookie
|
|
|
|
* path for first cookie
|
|
|
|
* secure indicator ("Yes" or "No") for first cookie
|
|
|
|
* expiration for first cookie
|
|
|
|
* with the eight items above repeated for each successive cookie
|
|
|
|
*/
|
|
|
|
list = DoGetCookieList();
|
|
|
|
BREAK = list[0];
|
|
|
|
cookieList = list.split(BREAK);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The permissionList is a sequence of items separated by the BREAK character. These
|
|
|
|
* items are:
|
|
|
|
* empty
|
|
|
|
* number for first permission
|
|
|
|
* +/- hostname for first permission
|
|
|
|
* with the above two items repeated for each successive permission
|
|
|
|
*/
|
|
|
|
list = DoGetPermissionList();
|
|
|
|
BREAK = list[0];
|
|
|
|
permissionList = list.split(BREAK);
|
|
|
|
loadCookies();
|
|
|
|
loadButtons();
|
|
|
|
}
|
|
|
|
|
|
|
|
function Save(){
|
|
|
|
var goneC = top.frames[button_frame].document.buttons.goneC;
|
|
|
|
var goneP = top.frames[button_frame].document.buttons.goneP;
|
|
|
|
var result = "|goneC|"+goneC.value+"|goneP|"+goneP.value+"|";
|
|
|
|
DoSave(result);
|
|
|
|
}
|
|
|
|
|
|
|
|
function Cancel(){
|
|
|
|
var result = "|goneC||goneP||";
|
|
|
|
DoSave(result);
|
|
|
|
}
|
|
|
|
|
1999-08-03 04:06:32 +04:00
|
|
|
</script>
|
|
|
|
</head>
|
1999-06-20 01:08:33 +04:00
|
|
|
|
1999-08-14 00:22:35 +04:00
|
|
|
<frameset rows = "10,10,125,50" border="0" framespacing="0" onload="loadFrames();">
|
1999-08-03 04:06:32 +04:00
|
|
|
<frame src="about:blank"
|
|
|
|
name="index_frame"
|
|
|
|
scrolling="no"
|
|
|
|
marginwidth="1"
|
|
|
|
marginheight="1"
|
|
|
|
noresize="noresize"/>
|
|
|
|
<frame src="about:blank"
|
|
|
|
name="title_frame"
|
|
|
|
scrolling="no"
|
|
|
|
marginwidth="1"
|
|
|
|
marginheight="1"
|
|
|
|
noresize="noresize"/>
|
|
|
|
<frameset cols="5,*,10,*,5" border="0" framespacing="0">
|
|
|
|
<frame src="about:blank"
|
|
|
|
name="spacer1_frame"
|
|
|
|
scrolling="auto"
|
|
|
|
marginwidth="0"
|
|
|
|
marginheight="0"
|
|
|
|
noresize="noresize"/>
|
|
|
|
<frame src="about:blank"
|
|
|
|
name="list_frame"
|
|
|
|
scrolling="auto"
|
|
|
|
marginwidth="0"
|
|
|
|
marginheight="0"
|
|
|
|
noresize="noresize"/>
|
|
|
|
<frame src="about:blank"
|
|
|
|
name="spacer2_frame"
|
|
|
|
scrolling="auto"
|
|
|
|
marginwidth="0"
|
|
|
|
marginheight="0"
|
|
|
|
noresize="noresize"/>
|
|
|
|
<frame src="about:blank"
|
|
|
|
name="prop_frame"
|
|
|
|
scrolling="auto"
|
|
|
|
marginwidth="0"
|
|
|
|
marginheight="0"
|
|
|
|
noresize="noresize"/>
|
|
|
|
<frame src="about:blank"
|
|
|
|
name="spacer3_frame"
|
|
|
|
scrolling="auto"
|
|
|
|
marginwidth="0"
|
|
|
|
marginheight="0"
|
|
|
|
noresize="noresize"/>
|
|
|
|
</frameset>
|
|
|
|
<frame src="about:blank"
|
|
|
|
name="button_frame"
|
|
|
|
scrolling="no"
|
|
|
|
marginwidth="1"
|
|
|
|
marginheight="1"
|
|
|
|
noresize="noresize"/>
|
|
|
|
</frameset>
|
|
|
|
|
|
|
|
<noframes>
|
|
|
|
<body> <P> </body>
|
|
|
|
</noframes>
|
|
|
|
</html>
|