From 23feeecbcf97f2db8675516b0441e472af1d9004 Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 3 Apr 2015 17:18:00 -0700 Subject: [PATCH] Wrap libts, don't leak into global namespace --- Gruntfile.js | 4 ++++ js/libtextsecure.js | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index 208e0384..06a5bfa8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -36,6 +36,10 @@ module.exports = function(grunt) { }, //TODO: Move errors back down? libtextsecure: { + options: { + banner: ";(function() {\n", + footer: "})();\n", + }, src: [ 'libtextsecure/errors.js', 'libtextsecure/libaxolotl.js', diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 8e3bcc97..2ede60c5 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -1,3 +1,4 @@ +;(function() { /* vim: ts=4:sw=4:expandtab * * This program is free software: you can redistribute it and/or modify @@ -39837,3 +39838,4 @@ window.textsecure.messaging = function() { return self; }(); +})();