         $(window).resize =>
             @select_simple_view_button.click() if $(window).width() < 768 and @list_display_mode != 'simple'
 
-        @notes.change @onNotesUpdated
+        # separate function for on change that accesses the notes values
+        @notes.change @onNotesChanged
         @notes.on 'keyup', @onNotesUpdated
+
+    updatePermaLink: () =>
+        squad_link = "#{window.location.href.split('?')[0]}?f=#{encodeURI @faction}&d=#{encodeURI @serialize()}&sn=#{encodeURI @current_squad.name}"
+        if @current_squad.additional_data.notes
+            squad_link = squad_link + "&sno=#{encodeURI @current_squad.additional_data.notes}"
+        @permalink.attr 'href', squad_link
+
+    onNotesChanged: =>
+        if @total_points > 0
+            @current_squad.additional_data.notes = @notes.val()
+            @updatePermaLink()
+            @onNotesUpdated()
 
     onNotesUpdated: =>
         if @total_points > 0

            @addShip()

    resetCurrentSquad: ->
        @current_squad =
            id: null
            name: $.trim(@squad_name_input.val()) or "Unnamed Squadron"
            dirty: false
            additional_data:
                points: @total_points
                description: ''
                cards: []
                notes: ''
            faction: @faction
        if @total_points > 0
            @current_squad.name = 'Unsaved Squadron'
            @current_squad.dirty = true
        @container.trigger 'xwing-backend:squadNameChanged'
        @container.trigger 'xwing-backend:squadDirtinessChanged'


        @squad_name_placeholder.text ''
        @squad_name_placeholder.append short_name
        @squad_name_input.val @current_squad.name
        @updatePermaLink()

    removeAllShips: ->
        while @ships.length > 0
