Sha256: 74040348adc86b4494fbf4f1e2389b9907deb23fa0b15c53e41b1ac9aa0c7257

Contents?: true

Size: 1.05 KB

Versions: 12

Compression:

Stored size: 1.05 KB

Contents

####**
#Cookies
#=======
#
#class up.cookies
####
#up.cookie = (->
#  u = up.util
#
#  escape = encodeURIComponent
#  unescape = decodeURIComponent
#
#  lastRaw = undefined
#  lastParsed = {}
#
#  all = ->
#    currentRaw = document.cookie
#    if u.isUndefined(lastRaw) || lastRaw != currentRaw
#      lastParsed = parse()
#      lastRaw = currentRaw
#    lastParsed
#
#  parse = ->
#    hash = {}
#    pairs = u.splitValues(document.cookie, ';')
#    for pair in pairs
#      parts = u.splitValues(pair, '=')
#      name = unescape(parts[0])
#      value = unescape(parts[1])
#      hash[name] = value
#    hash
#
#  remove = (name) ->
#    set(name, '', 'expires=Thu, 01-Jan-70 00:00:01 GMT; path=/')
#
#  get = (name) ->
#    all()[name]
#
#  set = (name, value, meta) ->
#    str = escape(name) + '=' + escape(value)
#    str += ';' + meta if meta
#    document.cookie = str
#    lastRaw = undefined
#
#  pop = (name) ->
#    value = get(name)
#    if u.isPresent(value)
#      remove(name)
#    value
#
#  all: all
#  get: get
#  set: set
#  remove: remove
#  pop: pop
#)()

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
unpoly-rails-1.0.3 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-1.0.1 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-1.0.0 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.62.1 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.62.0 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.61.1 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.61.0 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.60.3 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.60.2 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.60.1 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.60.0 lib/assets/javascripts/unpoly/cookie.coffee
unpoly-rails-0.57.0 lib/assets/javascripts/unpoly/cookie.coffee