diff --git a/js/privatebin.js b/js/privatebin.js index 7e4de064..59417512 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -25,7 +25,7 @@ // Immediately start random number generator collector. sjcl.random.startCollectors(); -$(function() { +jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { /** * static helper methods * @@ -1782,9 +1782,17 @@ $(function() { } } - /** - * main application start, called when DOM is fully loaded - * runs privatebin when translations were loaded - */ - i18n.loadTranslations($.proxy(privatebin.init, privatebin)); -}); + return { + helper: helper, + i18n: i18n, + filter: filter, + privatebin: privatebin + }; +}(jQuery, sjcl, Base64, RawDeflate); + +/** + * main application start, called when DOM is fully loaded + * runs privatebin when translations were loaded + */ +jQuery(jQuery.PrivateBin.i18n.loadTranslations(jQuery.proxy(jQuery.PrivateBin.privatebin.init, jQuery.PrivateBin.privatebin))); + diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 04f03668..3d51379c 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -69,7 +69,7 @@ if ($MARKDOWN): - + diff --git a/tpl/page.php b/tpl/page.php index bc18c41c..40c3e124 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -47,7 +47,7 @@ if ($MARKDOWN): - +