mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-24 07:20:45 -04:00
implementing JS module pattern to expose functions for unit testing
This commit is contained in:
parent
5f09264625
commit
8029c2819f
3 changed files with 17 additions and 9 deletions
|
@ -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)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue