File tree Expand file tree Collapse file tree 2 files changed +41
-18
lines changed Expand file tree Collapse file tree 2 files changed +41
-18
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
12< html >
2- < head >
3- < meta charset ="UTF-8 ">
4- < script src ='https://cdnjs.cloudflare.com/ajax/libs/tabletop.js/1.5.1/tabletop.min.js '> </ script >
5- < script language ="javascript " type ="text/javascript " src ="https://cdn.jsdelivr.net/npm/p5@1.4.1/lib/p5.min.js "> </ script >
6-
7- < script language ="javascript " type ="text/javascript " src ="sketch.js "> </ script >
8- </ head >
9-
10- < body >
3+
4+ < head >
5+ < script src ="https://cdn.jsdelivr.net/npm/papaparse@5.3.2/papaparse.min.js "> </ script >
6+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js "> </ script >
7+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/addons/p5.dom.min.js "> </ script >
8+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/addons/p5.sound.min.js "> </ script >
9+ < link rel ="stylesheet " type ="text/css " href ="style.css ">
10+ < meta charset ="utf-8 " />
11+
12+ </ head >
13+
14+ < body >
15+ < script src ="sketch.js "> </ script >
1116 < h1 > MadLibs</ h1 >
1217 < p > _____________! they said ________ as they jumped into their _____________ and flew off with their __________ __________."</ p >
13- </ body >
18+ </ body >
19+
1420</ html >
Original file line number Diff line number Diff line change @@ -10,11 +10,28 @@ var txt =
1010
1111function setup ( ) {
1212 noCanvas ( ) ;
13- Tabletop . init ( {
14- key : '15WyEmfu6B1UCzzqeacYnzI8lutrxF6uWvFDiSteBqTs' ,
15- callback : gotData ,
16- simpleSheet : true
17- } ) ;
13+ // Tabletop.init({
14+ // key: '15WyEmfu6B1UCzzqeacYnzI8lutrxF6uWvFDiSteBqTs',
15+ // callback: gotData,
16+ // simpleSheet: true
17+ // });
18+
19+ // Unfortunately since 2020 tabletop.js has been deprecated
20+ // because of some changes that Google had made. To learn
21+ // more about it, visit https://github.com/jsoma/tabletop
22+
23+ // In this example, the library Papa Parse has been used
24+ // in a very similar fashion, so do something like this
25+ // instead. Keep in mind that the Google Sheet link has
26+ // to a CSV link, rather than a web page!
27+ Papa . parse ( 'https://docs.google.com/spreadsheets/d/e/2PACX-1vSiJDczupcvlAJxd70RJ9hZina9cqweCiTj1EkYrH_17FhFBjdMFTEY2TOMmhwGBHGR05y7QRXLNbo6/pub?output=csv' , {
28+ download : true ,
29+ header : true ,
30+ complete : function ( results ) {
31+ var stuff = results . data
32+ data = stuff
33+ }
34+ } )
1835
1936 var button = createButton ( 'generate madlib' ) ;
2037 button . mousePressed ( generate ) ;
@@ -31,6 +48,6 @@ function generate() {
3148 createP ( madlib ) ;
3249}
3350
34- function gotData ( stuff , tabletop ) {
35- data = stuff ;
36- }
51+ // function gotData(stuff, tabletop) {
52+ // data = stuff;
53+ // }
You can’t perform that action at this time.
0 commit comments