From 47c2c171890dffc668c27a663b680650a468ce55 Mon Sep 17 00:00:00 2001 From: yamanq Date: Sat, 30 Sep 2017 18:30:11 -0400 Subject: [PATCH 1/2] add function to get website --- gyrio/index.html | 31 +++++++++++++++++-------------- gyrio/index.js | 6 ++++++ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/gyrio/index.html b/gyrio/index.html index d6939eb..4d18dfb 100644 --- a/gyrio/index.html +++ b/gyrio/index.html @@ -1,15 +1,18 @@ - - - - Foxnet - - - - - - - - - - \ No newline at end of file + + + + + Foxnet + + + + + + + + + + + + diff --git a/gyrio/index.js b/gyrio/index.js index e69de29..773110c 100644 --- a/gyrio/index.js +++ b/gyrio/index.js @@ -0,0 +1,6 @@ +function getWebsite(geturl) { + xmlhttp=new XMLHttpRequest(); + xmlhttp.open("GET", geturl, false); + xmlhttp.send(); + var data = xmlhttp.responseText; +} From 7a22c1be81dae4923722d2aa6ced23dbfe90147d Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Sat, 30 Sep 2017 18:32:26 -0400 Subject: [PATCH 2/2] drawing begin --- gyrio/index.html | 2 +- gyrio/index.js | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/gyrio/index.html b/gyrio/index.html index d6939eb..32acc98 100644 --- a/gyrio/index.html +++ b/gyrio/index.html @@ -9,7 +9,7 @@ - + \ No newline at end of file diff --git a/gyrio/index.js b/gyrio/index.js index e69de29..d0fdbee 100644 --- a/gyrio/index.js +++ b/gyrio/index.js @@ -0,0 +1,23 @@ +var canvas = document.getElementById("canvas"); +var ctx = canvas.getContext("2d"); +canvas.width = screen.width; +canvas.height = screen.height; + +function randInt(min,max) { + return Math.floor(Math.random() * (max - min + 1)) + min; +} + + +function generateString() { + var final = ""; + var length = randInt(50,100); + for(var i = 0; i < length; i++) { + final += randInt(0,1); + } + return final; +} + +console.log(generateString()); + +ctx.fillStyle = "#000"; +ctx.fillRect(0,0, canvas.width, canvas.height); \ No newline at end of file