Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netrunner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Odilitime
netrunner
Commits
a11ebd17
Commit
a11ebd17
authored
7 years ago
by
Sharinigma
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
30c891fd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CookieManager.js
+71
-0
71 additions, 0 deletions
CookieManager.js
with
71 additions
and
0 deletions
CookieManager.js
0 → 100644
+
71
−
0
View file @
a11ebd17
var
ExtremblerCookieManager
=
{
cookieLiveTime
:
100
,
cookieName
:
''
,
baseUrl
:
''
,
setCookieLiveTime
:
function
(
value
)
{
this
.
cookieLiveTime
=
value
;
},
setCookieName
:
function
(
value
)
{
this
.
cookieName
=
value
;
},
unsetCookieName
:
function
(
value
)
{
this
.
cookieName
=
''
;
},
/**
* setting Base url on cookie if need
*/
setBaseUrl
:
function
(
url
)
{
this
.
baseUrl
=
url
;
},
getBaseUrl
:
function
(
url
)
{
return
this
.
baseUrl
;
},
createCookie
:
function
(
name
)
{
if
(
name
!=
''
){
this
.
setCookieName
(
name
);
var
days
=
this
.
cookieLiveTime
;
var
value
=
1
;
var
name
=
this
.
cookieName
;
if
(
days
)
{
var
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
(
days
*
24
*
60
*
60
*
1000
));
var
expires
=
"
; expires=
"
+
date
.
toGMTString
();
}
else
var
expires
=
""
;
document
.
cookie
=
escape
(
name
)
+
"
=
"
+
escape
(
value
)
+
expires
+
"
; path=/
"
;
}
},
readCookie
:
function
(
name
)
{
if
(
name
!=
''
){
this
.
setCookieName
(
name
);
var
name
=
this
.
cookieName
;
var
nameEQ
=
escape
(
name
)
+
"
=
"
;
var
ca
=
document
.
cookie
.
split
(
'
;
'
);
for
(
var
i
=
0
;
i
<
ca
.
length
;
i
++
)
{
var
c
=
ca
[
i
];
while
(
c
.
charAt
(
0
)
==
'
'
)
c
=
c
.
substring
(
1
,
c
.
length
);
if
(
c
.
indexOf
(
nameEQ
)
==
0
)
return
unescape
(
c
.
substring
(
nameEQ
.
length
,
c
.
length
));
}
return
null
;
}
return
null
;
},
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment