 exportObj = exports ? this
+
+String::startsWith ?= (t) ->
+    @indexOf t == 0
 
 sortWithoutQuotes = (a, b) ->
     a_name = a.replace /[^a-z0-9]/ig, ''

            collection_content.append row

        shipcollection_content = $ @modal.find('.collection-ship-content')
        for ship in Object.keys(exportObj.ships).sort(sortWithoutQuotes)
            count = parseInt(@singletons.ship?[ship] ? 0)
            row = $.parseHTML $.trim """
                <div class="row-fluid">

        backend.loadCollection cb

    setupUI: ->
        # Create list of released singletons
        singletonsByType = {}
        for expname, items of exportObj.manifestByExpansion
            for item in items
                (singletonsByType[item.type] ?= {})[item.name] = true
        for type, names of singletonsByType
            sorted_names = (name for name of names).sort(sortWithoutQuotes)
            singletonsByType[type] = sorted_names

        @modal = $ document.createElement 'DIV'
        @modal.addClass 'modal hide fade collection-modal hidden-print'
        $('body').append @modal
