blob: 5a9ae72ab7adbf83790cd5c22069f2b0de49368f (
plain)
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
|
function Subscribe(topicid) {
ajax.get("userhistory.php?action=thread_subscribe&topicid=" + topicid + "&auth=" + authkey, function() {
var subscribeLink = $("#subscribelink" + topicid).raw();
if (subscribeLink) {
if (subscribeLink.firstChild.nodeValue.charAt(0) == '[') {
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(1) == 'U'
? '[Subscribe]'
: '[Unsubscribe]';
}
else {
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(0) == 'U'
? "Subscribe"
: "Unsubscribe";
}
}
});
}
function SubscribeComments(page, pageid) {
ajax.get('userhistory.php?action=comments_subscribe&page=' + page + '&pageid=' + pageid + '&auth=' + authkey, function() {
var subscribeLink = $("#subscribelink_" + page + pageid).raw();
if (subscribeLink) {
subscribeLink.firstChild.nodeValue = subscribeLink.firstChild.nodeValue.charAt(0) == 'U'
? "Subscribe"
: "Unsubscribe";
}
});
}
function Collapse() {
var collapseLink = $('#collapselink').raw();
var hide = (collapseLink.innerHTML.substr(0,1) == 'H' ? 1 : 0);
if ($('.row').results() > 0) {
$('.row').gtoggle();
}
if (hide) {
collapseLink.innerHTML = 'Show post bodies';
} else {
collapseLink.innerHTML = 'Hide post bodies';
}
}
|