git ssb

0+

Zach! / music-visions



Tree: 101053a1f48bbe8fb2e7338985d721188ba72e3e

Files: 101053a1f48bbe8fb2e7338985d721188ba72e3e / stores / songs.js

438 bytesRaw
1module.exports = store
2
3function store (state,emitter) {
4 var songs = require('../songs.json')
5 state.songs = songs.songs
6 state.currentSong = ''
7
8 emitter.on('changeSong', function (song) {
9 song = song.replace(/\s+/g, '-').toLowerCase()
10 document.getElementById('tracklist').classList.toggle('fade-in')
11 emitter.emit('pushState', '/#songbook/'+song)
12 document.getElementById('text').classList.toggle('fade-in')
13 })
14}
15
16

Built with git-ssb-web