mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
408 B
26 lines
408 B
11 years ago
|
class app.Settings
|
||
|
hasDocs: ->
|
||
|
try
|
||
|
!!Cookies.get 'docs'
|
||
|
catch
|
||
|
|
||
|
getDocs: ->
|
||
|
try
|
||
|
Cookies.get('docs')?.split('/') or app.config.default_docs
|
||
|
catch
|
||
|
app.config.default_docs
|
||
|
|
||
|
setDocs: (docs) ->
|
||
|
try
|
||
|
Cookies.set 'docs', docs.join('/'),
|
||
|
path: '/'
|
||
|
expires: 1e8
|
||
|
catch
|
||
|
return
|
||
|
|
||
|
reset: ->
|
||
|
try
|
||
|
Cookies.expire 'docs'
|
||
|
catch
|
||
|
return
|