MCPcopy Create free account
hub / github.com/codecombat/codecombat / onClickCampaignSwitch

Method onClickCampaignSwitch

app/views/play/CampaignView.js:2296–2303  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

2294 }
2295
2296 onClickCampaignSwitch (e) {
2297 const campaignSlug = $(e.target).data('campaign-slug')
2298 if (this.isPremiumCampaign(campaignSlug) && !me.isPremium()) {
2299 e.preventDefault()
2300 e.stopImmediatePropagation()
2301 return this.promptForSubscription(campaignSlug, 'premium campaign switch clicked')
2302 }
2303 }
2304
2305 loadUserPollsRecord () {
2306 if (storage.load('ignored-poll')) { return }

Callers

nothing calls this directly

Calls 4

isPremiumCampaignMethod · 0.95
promptForSubscriptionMethod · 0.95
dataMethod · 0.80
isPremiumMethod · 0.80

Tested by

no test coverage detected