-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.js
32 lines (25 loc) · 925 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const infiniteScrollExample =
`// Infinite Scroll Example
getsy('http://scrollmagic.io/examples/advanced/infinite_scrolling.html', { iframe: true })
.then(myGetsy => {
// myGetsy.showFrame() // Show the frame?
console.log(myGetsy.getMe('.box1').length + ' boxes.')
myGetsy.scroll(10).then(({ succesfulTimes, totalRetries }) => {
console.log('New content loaded ' + succesfulTimes + ' times with ' + totalRetries + ' total retries.')
console.log(myGetsy.getMe('.box1').length + ' boxes.') // More content!
myGetsy.hideFrame()
})
})
// Click getMe and open your browser console.
// Go to the repo to see the docs and download/install.
`
var myCodeMirror = CodeMirror(document.getElementById('text-container'), {
value: infiniteScrollExample,
mode: "javascript",
theme: 'material',
lineNumbers: true,
autoCloseBrackets: true,
});
function runCode() {
eval(myCodeMirror.getValue());
}