diff --git a/039_madlibs/P5/index.html b/039_madlibs/P5/index.html index a9ee86c..e93e5c9 100644 --- a/039_madlibs/P5/index.html +++ b/039_madlibs/P5/index.html @@ -1,14 +1,20 @@ + - - - - - - - - - + + + + + + + + + + + + +

MadLibs

_____________! they said ________ as they jumped into their _____________ and flew off with their __________ __________."

- + + diff --git a/039_madlibs/P5/sketch.js b/039_madlibs/P5/sketch.js index c0d8177..77851bc 100644 --- a/039_madlibs/P5/sketch.js +++ b/039_madlibs/P5/sketch.js @@ -10,11 +10,28 @@ var txt = function setup() { noCanvas(); - Tabletop.init({ - key: '15WyEmfu6B1UCzzqeacYnzI8lutrxF6uWvFDiSteBqTs', - callback: gotData, - simpleSheet: true - }); + // Tabletop.init({ + // key: '15WyEmfu6B1UCzzqeacYnzI8lutrxF6uWvFDiSteBqTs', + // callback: gotData, + // simpleSheet: true + // }); + + // Unfortunately since 2020 tabletop.js has been deprecated + // because of some changes that Google had made. To learn + // more about it, visit https://github.com/jsoma/tabletop + + // In this example, the library Papa Parse has been used + // in a very similar fashion, so do something like this + // instead. Keep in mind that the Google Sheet link has + // to a CSV link, rather than a web page! + Papa.parse('https://docs.google.com/spreadsheets/d/e/2PACX-1vSiJDczupcvlAJxd70RJ9hZina9cqweCiTj1EkYrH_17FhFBjdMFTEY2TOMmhwGBHGR05y7QRXLNbo6/pub?output=csv', { + download: true, + header: true, + complete: function(results) { + var stuff = results.data + data = stuff + } + }) var button = createButton('generate madlib'); button.mousePressed(generate); @@ -31,6 +48,6 @@ function generate() { createP(madlib); } -function gotData(stuff, tabletop) { - data = stuff; -} +// function gotData(stuff, tabletop) { +// data = stuff; +// }