From 08418dd1e0133fcda2d95b5d3a144673299b6f13 Mon Sep 17 00:00:00 2001 From: Adrian Cooney Date: Mon, 1 Jul 2013 02:47:28 +0100 Subject: [PATCH] Updated the demo --- index.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 9d3abf1..123982b 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,10 @@ color: #fff; border-radius: 8px; cursor: pointer; - margin-top: 120px; + } + + button:first-child { + margin-top: 80px; } code { @@ -86,6 +89,7 @@

Pop open the Chrome Dev tools (Ctrl/CMD + Shift + J) and click the button below to snapshot the canvas to the left and see the output within the console.

+

This is the brainchild of a bit of idiocy and some insightful comments on a Hacker News thread. Created by @dunxrion.

@@ -170,9 +174,18 @@ for(var i = 0, length = 10; i < length; i++) { })(); document.getElementById("snap").addEventListener("click", function() { - flash = true; console.snapshot(canvas); -}) + setTimeout(function() { + flash = true; + }, 500) +}); + +document.getElementById("screenie").addEventListener("click", function() { + console.screenshot(canvas); + setTimeout(function() { + flash = true; + }, 500) +}); \ No newline at end of file