Option 1 with CodePen
- Login to CodePen.
- Go to this project.
- Click the
forkbutton at the top to make a project copy in your CodePen account.
Option 2 with a Common Code Editor (like Editey in Google Drive)
-
In your code folder create empty
index.html,style.css, andcode.jsfiles. (Specific Editey Instructions on setting up an empty project can be found here.) -
Copy the corresponding code from the CodePen project into each of the files using your code editor.
Option 3 ... just give me the files Dowload the latest version of the trivia app files from this folder.
- Login to Google Drive.
- Go to this spreadsheet.
- Create your own copy of the spreadsheet by selecting
File > Make a copy.... - Now publish your copy of the spreadsheet by selecting
File > Publish to the web...and click thePublishbutton. - Once your spreadsheet is published, click the
sharebutton (upper right-hand side) of the spreadsheet page and copy the shareable link. (Make sure your link is set toAnyone with the link can view.) - Find the code below in your CodePen project
code.jsfile. It is near the bottom. Replace your link as thekey.
function setup() {
Tabletop.init({
key: "https://docs.google.com/spreadsheets/d/14z4Irs400-SEr9Enn_y6G-2t0p6b-fhxmzUtJNQphO4/edit?usp=sharing",
callback: data => {
var questionBank = getShuffledArray(data["Sheet1"].elements); //shuffle question order
main(questionBank);
}
});
}- Verify that you can make changes to the questions in your spreadsheet and see those changes in your trivia app. If using CodePen, click
Save All + Run. If using Editey in Google Drive, click the preview window's refresh button.