From 2061f7e4ba989deca179dbb5e9ce7ffb08546776 Mon Sep 17 00:00:00 2001 From: ratpik Date: Tue, 21 Oct 2014 00:19:16 +0530 Subject: [PATCH] Removed window reference in library to enable usage with web workers --- vkbeautify.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vkbeautify.js b/vkbeautify.js index 13cee3a..121bfa5 100644 --- a/vkbeautify.js +++ b/vkbeautify.js @@ -45,7 +45,7 @@ * */ -(function() { +var vkbeautify = (function() { function createShiftArr(step) { @@ -352,7 +352,9 @@ vkbeautify.prototype.sqlmin = function(text) { return text.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")"); } -window.vkbeautify = new vkbeautify(); +vkbeautify = new vkbeautify(); + +return vkbeautify; })();