-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstants.j
More file actions
34 lines (31 loc) · 947 Bytes
/
Constants.j
File metadata and controls
34 lines (31 loc) · 947 Bytes
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
debug = window.location.protocol == 'file:';
serverUrl = debug ? "http://localhost:8080" : "data";
tagsPath = "/tags";
queryPath = "/query";
itemPath = "/item";
DEFAULT_DATE = "2010-02-28";
// Popover cookie name
c_name="CourageIsContagious";
c_value = "SaveBradleyManning";
function setCookie(c_name, value, exdays) {
var exdate = new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value = escape(value) + ((exdays == null) ? "": "; expires=" + exdate.toUTCString());
document.cookie = c_name + "=" + c_value;
}
function getCookie(c_name) {
var i,
x,
y,
ARRcookies = document.cookie.split(";");
for (i = 0; i < ARRcookies.length; i++)
{
x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
x = x.replace(/^\s+|\s+$/g, "");
if (x == c_name)
{
return unescape(y);
}
}
}