From ac57119cd7bee6119eaaccbd95b3c8844d2fd9cf Mon Sep 17 00:00:00 2001 From: shakaman Date: Wed, 17 Sep 2014 18:54:59 +0200 Subject: [PATCH] Added log option to deactivate console.log --- svg_todataurl.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/svg_todataurl.js b/svg_todataurl.js index 9221f67..dce58d9 100755 --- a/svg_todataurl.js +++ b/svg_todataurl.js @@ -11,6 +11,8 @@ Additional: image/jpeg. options is a map of options: { + log: true + callback: function(dataURL) Callback function which is called when the data URL is ready. This is only necessary when using native PNG renderer. @@ -41,9 +43,10 @@ SVGElement.prototype.toDataURL = function(type, options) { var _svg = this; + var log = (options.log) ? options.log : true; function debug(s) { - console.log("SVG.toDataURL:", s); + if (log) console.log("SVG.toDataURL:", s); } function exportSVG() {