()
| 1121 | } |
| 1122 | |
| 1123 | afterInsert () { |
| 1124 | super.afterInsert() |
| 1125 | const preloadImages = ['/images/pages/base/modal_background.png', '/images/level/popover_background.png', '/images/level/code_palette_wood_background.png', '/images/level/code_editor_background_border.png'] |
| 1126 | _.delay(() => preloadImages.forEach(img => ($('<img/>')[0].src = img)), 2000) |
| 1127 | |
| 1128 | if (utils.getQueryVariable('signup') && me.get('anonymous')) { |
| 1129 | return this.promptForSignup() |
| 1130 | } |
| 1131 | if (!me.isPremium() && (this.isPremiumCampaign() || (this.options.worldComplete && !features.noAuth && !me.isInHourOfCode()))) { |
| 1132 | if (me.get('anonymous')) { |
| 1133 | return this.promptForSignup() |
| 1134 | } |
| 1135 | const campaignSlug = window.location.pathname.split('/')[2] |
| 1136 | return this.promptForSubscription(campaignSlug, 'premium campaign visited') |
| 1137 | } |
| 1138 | |
| 1139 | this.maybeAutoShowPromotionModal() |
| 1140 | } |
| 1141 | |
| 1142 | maybeAutoShowPromotionModal () { |
| 1143 | if ( |
nothing calls this directly
no test coverage detected