 # page popup.  This also differs from ExclusionRulesOption in that, on the page popup, there is always a URL
 # (@url) associated with the current tab.
 class ExclusionRulesOnPopupOption extends ExclusionRulesOption
-  constructor: (field, onUpdated, @url) ->
-    super field, onUpdated
+  constructor: (@url, args...) ->
+    super(args...)
 
   addRule: ->
     element = super @generateDefaultPattern()


  # Populate options. The constructor adds each new object to "Option.all".
  for name, type of options
    new type(name,enableSaveButton)

initPopupPage = ->
  chrome.tabs.getSelected null, (tab) ->

        window.close()

    # Populate options. Just one, here.
    exclusions = new ExclusionRulesOnPopupOption(tab.url, "exclusionRules", onUpdated)

    updateState()
    document.addEventListener "keyup", updateState
