summaryrefslogtreecommitdiff
path: root/client/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/index.js')
-rw-r--r--client/index.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/client/index.js b/client/index.js
index c003a8b3..1a80e74f 100644
--- a/client/index.js
+++ b/client/index.js
@@ -2,7 +2,7 @@ import React from 'react'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import { Provider } from 'react-redux'
-import 'waypoints/lib/noframework.waypoints.min.js';
+import 'waypoints/lib/noframework.waypoints.min.js'
import { toArray } from './util'
import Applet from './applet'
@@ -62,7 +62,7 @@ function runApplets() {
let payload
try {
payload = JSON.parse(el.dataset.payload)
- console.log(payload)
+ // console.log(payload)
} catch (e) {
return null
}
@@ -106,7 +106,7 @@ function runApplets() {
}
payload.dataset = dataset
payload.url = url
- console.log(payload)
+ // console.log(payload)
return [el, payload]
}).filter(a => !!a)
const withDataset = applets.map(a => a[1].dataset ? a[1] : null).filter(a => !!a)
@@ -122,20 +122,20 @@ function runApplets() {
function buildWaypoints() {
const element = document.querySelector('.content section:nth-child(2)')
- if (element) {
- var waypoint = new Waypoint({
- element,
- handler: function(direction) {
- if (direction === 'down') {
- document.body.classList.add('scrolled')
- } else {
- document.body.classList.remove('scrolled')
- }
- // console.log(direction)
- // console.log('Scrolled to waypoint!')
+ if (!element) return null
+ let waypoint = new Waypoint({
+ element,
+ handler: function(direction) {
+ if (direction === 'down') {
+ document.body.classList.add('scrolled')
+ } else {
+ document.body.classList.remove('scrolled')
}
- })
- }
+ // console.log(direction)
+ // console.log('Scrolled to waypoint!')
+ }
+ })
+ return waypoint
}
function main() {