()
| 70 | } |
| 71 | |
| 72 | afterRender () { |
| 73 | super.afterRender() |
| 74 | if (this.cannotAccess()) { |
| 75 | new APCSPLanding({ // eslint-disable-line no-new |
| 76 | el: this.$('#apcsp-landing')[0] |
| 77 | }) |
| 78 | } |
| 79 | |
| 80 | this.$el.find('pre>code').each(function () { |
| 81 | const els = $(this) |
| 82 | const c = els.parent() |
| 83 | let lang = els.attr('class') |
| 84 | if (lang) { |
| 85 | lang = lang.replace(/^lang-/, '') |
| 86 | } else { |
| 87 | lang = 'python' |
| 88 | } |
| 89 | |
| 90 | const aceEditor = aceUtils.initializeACE(c[0], lang) |
| 91 | aceEditor.setShowInvisibles(false) |
| 92 | aceEditor.setBehavioursEnabled(false) |
| 93 | aceEditor.setAnimatedScroll(false) |
| 94 | aceEditor.$blockScrolling = Infinity |
| 95 | }) |
| 96 | if (_.contains(location.href, '#')) { |
| 97 | return _.defer(() => { |
| 98 | // Remind the browser of the fragment in the URL, so it jumps to the right section. |
| 99 | location.href = location.href // eslint-disable-line no-self-assign |
| 100 | }) |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | DynamicAPCSPView.initClass() |
| 105 | return DynamicAPCSPView |
nothing calls this directly
no test coverage detected