Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
loadPage() {
if (this.request) {
this.request.abort()
delete this.request
}
setTitle(this.props.title)
const request = new XMLHttpRequest()
const url = `/static/guides/${this.props.pageSource}.json`
request.open("GET", url)
request.send()
request.onload = (e) => {
if (request.status != 200) {
console.error("Failed to load guide page", url)
this.setState({
contents: "Failed to load guide page. Check console."
})
return
}
let res = JSON.parse(request.responseText)
componentDidMount() {
setTitle("Play Back Melodies Ear Training Exercise")
}
componentDidMount() {
setTitle("Flash Cards")
}
componentDidMount() {
setTitle("Play along")
this.updateBeat(0)
if (!this.props.newSong) {
this.loadSong()
}
dispatch(this, {
setMinChordSpacing: (e, value) => {
this.setState({
chordMinSpacing: value
}, () => this.refreshSong())
},
setAutochordsRate: (e, value) => {
this.setState(
{autochordsRate: value},
() => this.refreshSong()
)
componentDidMount() {
setTitle("Stats")
if (!N.session.currentUser) {
this.props.router.push("/")
} else {
this.loadStats()
}
}
componentDidMount() {
let loadingCount = 0
setTitle("Learn Intervals Ear Training Exercise")
this.setState({
loading: true
})
let melodySongs = {}
let enabled = {}
MelodyRecognitionExercise.melodies.forEach((m) => {
loadingCount += 1
MelodyRecognitionExercise.fetchMelody(m.song).then(song => {
loadingCount -= 1
melodySongs[m.song] = song
enabled[`${m.interval}-${m.direction}`] = true
if (loadingCount == 0) {
componentDidMount() {
setTitle("Log In")
}
componentDidMount() {
setTitle()
this.setStaff(STAVES[0], () => {
this.enterWaitMode()
})
dispatch(this, {
saveGeneratorPreset: (e, form) => {
if (this.state.savingPreset) {
return;
}
let preset = JSON.stringify({
type: "notes",
name: this.state.currentGenerator.name,
settings: this.state.currentGeneratorSettings,
})