From 2e494bde232ed2fc7c6ddfb997d8dffa468639d7 Mon Sep 17 00:00:00 2001 From: Obexer Christoph Date: Sun, 11 Dec 2011 18:06:57 +0100 Subject: [PATCH] moved common code into tests/test.js --- tests/test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/test.js diff --git a/tests/test.js b/tests/test.js new file mode 100644 index 0000000..3c21bcd --- /dev/null +++ b/tests/test.js @@ -0,0 +1,25 @@ +/* + html2canvas @VERSION@ + Copyright (c) 2011 Niklas von Hertzen. All rights reserved. + http://www.twitter.com/niklasvh + + Released under MIT License +*/ +(function(document, window) { + var scrStart = ''; + document.write(scrStart + '../external/jquery-1.6.2.min.js' + scrEnd); + var html2canvas = ['Core', 'Generate', 'Parse', 'Preload', 'Queue', 'Renderer', 'plugins/jquery.plugin.html2canvas'], i; + for (i = 0; i < html2canvas.length; ++i) { + document.write(scrStart + '../src/' + html2canvas[i] + '.js' + scrEnd); + } + window.onload = function() { + if (window.setUp) { + window.setUp(); + } + setTimeout(function() { + $(document.body).html2canvas({ + logging: true + }); + }, 100); + }; +}(document, window)); \ No newline at end of file