       val.split(/\s+/)
     else []
 
-  get_item: ->
+  get_items: ->
     @unpack(localStorage.getItem(@key()))
 
-  set_item: (val) ->
+  set_items: (val) ->
     localStorage.setItem(@key(), @pack(val))
 
 


on_repo_page = ->
  $(".repohead").length > 0


init = ->
  if on_repo_page()
    new RepoPage




# Models

class Event
  constructor: (@name, @caption) ->

class FilterSet
  constructor: (@repo_name) ->

  is_filtered: (event_name) ->
    event_name in @get_item()

  update: (event_name, is_filtered) ->
    s = (e for e in @get_item() when e isnt event_name)
    s.push(event_name) if is_filtered
    @set_item(s)

  key: ->
    "amck-gh-filter" + @repo_name

  repo_name: ->
    $(".js-current-repository").attr("href")

class NewsFeedPage
  constructor: ->
    new NewsFeedFilter().inject()


# Controls
