forked from 0x2620/oxjs
remove unneeded Ox. prefix from path and file names
This commit is contained in:
parent
4138e4e558
commit
51696562f1
1365 changed files with 43 additions and 43 deletions
20
source/UI/js/Core/Cookies.js
Normal file
20
source/UI/js/Core/Cookies.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
Ox.Cookies = function() {
|
||||
var name, value, cookies;
|
||||
if (arguments.length == 1) {
|
||||
name = arguments[0];
|
||||
return Ox.Cookies()[name];
|
||||
} else if (arguments.length == 2) {
|
||||
name = arguments[0];
|
||||
value = arguments[1];
|
||||
document.cookie = name + '=' + encodeURIComponent(value);
|
||||
} else {
|
||||
value = {}
|
||||
if (document.cookie && document.cookie != '') {
|
||||
document.cookie.split('; ').forEach(function(cookie) {
|
||||
name = cookie.split('=')[0];
|
||||
value[name] = Ox.decodeURIComponent(cookie.substring(name.length + 1));
|
||||
});
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue