-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchangestatus.html
96 lines (88 loc) · 3.51 KB
/
changestatus.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JWChat - Change Online Status</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="shared.js"></script>
<script src="switchStyle.js"></script>
<script>
<!--
var jid;
var srcW; // the source window with necessary data
function doSubmit() {
var newstat, away;
for (var el=0;el<document.statF.status.length;el++) {
if (document.statF.status[el].checked) {
newstat = document.statF.status[el].value;
break;
}
}
if (document.statF.msg.value && document.statF.msg.value != '')
away = document.statF.msg.value;
else
away = opener.top.onlstatus[newstat];
if (typeof(jid) != 'undefined' && jid != '')
opener.top.sendCustomPresence(jid,newstat,away);
else
opener.top.changeStatus(newstat,away);
window.close();
}
var jid;
function init() {
getArgs();
jid = passedArgs['jid'];
for (var el=0;el<document.statF.status.length;el++) {
var presence = (typeof(jid)!='undefined')?opener.roster.getUserByJID(jid).status:opener.top.onlstat;
if (document.statF.status[el].value == presence) {
document.statF.status[el].checked = true;
break;
}
}
if (typeof(opener.top.pass)=='undefined')
document.getElementById('offline').style.display = 'none';
}
function keyPressed(e) {
if (e.ctrlKey && e.keyCode == 13)
doSubmit();
else if (e.keyCode == 27)
window.close();
}
onkeydown = keyPressed;
onload = init;
//-->
</script>
<script for="document" event="onkeydown()" language="JScript">
<!--
if (window.event.ctrlKey && window.event.keyCode == 13)
sendSub();
if (window.event.keyCode == 27)
window.close();
//-->
</script>
</head>
<body style="margin:8px">
<form name="statF">
<table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0 style="margin-bottom: 8px;">
<tr>
<td><input type=radio name="status" value="available" id="available"><label for="available"><img src="images/available.gif"> online</label></td>
<td><input type=radio name="status" value="xa" id="xa"><label for="xa"><img src="images/xa.gif"> AFK</label></td>
</tr>
<tr>
<td><input type=radio name="status" value="chat" id="chaty"><label for="chaty"><img src="images/chat.gif"> free for chat</label></td>
<td><input type=radio name="status" value="dnd" id="dnd"><label for="dnd"><img src="images/dnd.gif"> DND</label></td>
</tr>
<tr>
<td><input type=radio name="status" value="away" id="away"><label for="away"><img src="images/away.gif"> away</label></td>
<td><input type=radio name="status" value="unavailable" id="unavailable"><label for="unavailable"><img src="images/invisible.gif"> Invisible</label></td>
</tr>
<tr id="offline">
<td> </td><td><input type=radio name="status" value="offline" id="offl"><label for="offl"><img src="images/unavailable.gif"> offline</label></td>
</tr>
<tr><td colspan=2><b>Status Message:</b></td></tr>
<tr height="100%"><td colspan=2><textarea id="msg" wrap="physical" class="msgBox"></textarea></td></tr>
<tr><td colspan=2><hr noshade size="1" size="100%"></td></tr>
<tr><td colspan=2 align="right" id="buttonbox"><button onClick="window.close();">Cancel</button> <button onClick="return doSubmit();">Set</button></td></tr>
</table>
</form>
</body>
</html>