| 74 | } |
| 75 | |
| 76 | initialize () { |
| 77 | if (utils.isCodeCombat) { |
| 78 | loadAetherLanguage('javascript').then(aetherLang => { |
| 79 | if (typeof esper !== 'undefined') { |
| 80 | ({ |
| 81 | realm |
| 82 | } = new esper()) |
| 83 | return this.parser = realm.parser.bind(realm) |
| 84 | } |
| 85 | }) |
| 86 | } |
| 87 | this.campaigns = new Campaigns([]) |
| 88 | this.listenTo(this.campaigns, 'sync', this.onCampaignsLoaded) |
| 89 | return this.supermodel.trackRequest(this.campaigns.fetch({ |
| 90 | data: { |
| 91 | project: 'slug' |
| 92 | } |
| 93 | })) |
| 94 | } |
| 95 | |
| 96 | onCampaignsLoaded (campCollection) { |
| 97 | return (() => { |