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
|
// The root domain is used so that subdomains don't result in
// spurious extra urls (e.g. both dump.fm/nick and sub.dump.fm/nick)
window.RootDomain = location.href.match(/http:\/\/(\w)+\./)
? 'http://dump.fm/' : '/';
window.cache = {};
window.PendingMessages = {};
window.MessageContentCache = {};
window.RawFavs = {};
window.MaxImagePosts = 30;
// todo: preload these. also, look into image sprites (no go on animating their sizes tho)
// css clipping perhaps?
window.Imgs = {
"chatThumb": "/static/img/thumbs/smallheartfaved.gif",
"chatThumbBig": "/static/img/thumbs/chatheartover.gif",
"chatThumbOff": "/static/img/thumbs/smallheart.gif",
"chatThumbDot": "/static/img/thumbs/smallheart.gif",
"logThumb": "/static/img/thumbs/heartfaved.gif",
"logThumbBig": "/static/img/thumbs/heartover.gif",
"logThumbOff": "/static/img/thumbs/heart.gif"
}
window.Anim = {
"chatThumbBig": {"width": "54px", "height": "54px", "right": "0px", "bottom": "2px"},
"chatThumbTiny": {"width": "16px", "height": "16px", "right": "8px", "bottom": "8px"},
"chatThumb": {"width": "16px", "height": "16px", "right": "4px", "bottom": "4px"},
"logThumb": {"width": "27px", "height": "27px", "marginRight": "0px", "marginTop": "0px"},
"logThumbBig": {"width": "64px", "height": "64px", "marginRight": "-2px", "marginTop": "-2px"}
}
window.Preferences = {
"Domain": '.dump.fm',
"getProperty": function(prop, defaultValue) {
var value = $.cookie(prop);
return (value !== null) ? value : defaultValue;
},
"setProperty": function(prop, val) {
$.cookie(prop, val, { domain: Preferences.Domain, path: '/' });
},
"delProperty": function(prop) {
$.cookie(prop, null, { domain: Preferences.Domain, path: '/' });
}
};
|