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

Method initialize

app/views/account/PrepaidView.js:46–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 }
45
46 initialize () {
47 let left
48 super.initialize()
49
50 // HACK: Make this one specific page responsive on mobile.
51 $('head').append('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; viewport-fit=cover">')
52
53 this.codes = new CocoCollection([], { url: '/db/user/' + me.id + '/prepaid_codes', model: Prepaid })
54 this.codes.on('sync', code => (typeof this.render === 'function' ? this.render() : undefined))
55 this.supermodel.loadCollection(this.codes, { cache: false })
56
57 this.ppc = (left = utils.getQueryVariable('_ppc')) != null ? left : ''
58 if (!_.isEmpty(this.ppc)) {
59 this.ppcQuery = true
60 return this.loadPrepaid(this.dashedPPC())
61 }
62 }
63
64 getMeta () {
65 return { title: $.i18n.t('account.prepaids_title') }

Callers

nothing calls this directly

Calls 3

loadPrepaidMethod · 0.95
dashedPPCMethod · 0.95
renderMethod · 0.45

Tested by

no test coverage detected