This commit is contained in:
rugk 2017-02-17 22:46:18 +01:00
parent 52d1be1b54
commit c033775779
No known key found for this signature in database
GPG key ID: 05D40A636AFAB34D

View file

@ -986,8 +986,8 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var me = {}; var me = {};
var $errorMessage, var $errorMessage,
$statusMessage, $loadingIndicator,
$loadingIndicator; $statusMessage;
var currentIcon = [ var currentIcon = [
'glyphicon-time', // loading icon 'glyphicon-time', // loading icon
@ -1220,8 +1220,8 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
// not a reset, but first set of the elements // not a reset, but first set of the elements
$errorMessage = $('#errormessage'); $errorMessage = $('#errormessage');
$statusMessage = $('#status');
$loadingIndicator = $('#loadingindicator'); $loadingIndicator = $('#loadingindicator');
$statusMessage = $('#status');
// display status returned by php code, if any (e.g. paste was properly deleted) // display status returned by php code, if any (e.g. paste was properly deleted)
var serverStatus = $statusMessage.text(); var serverStatus = $statusMessage.text();
@ -1250,9 +1250,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var me = {}; var me = {};
var $pasteSuccess, var $pasteSuccess,
$shortenButton,
$pasteUrl, $pasteUrl,
$remainingTime; $remainingTime,
$shortenButton;
/** /**
* forward to URL shortener * forward to URL shortener
@ -1378,10 +1378,10 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
*/ */
me.init = function() me.init = function()
{ {
$shortenButton = $('#shortenbutton');
$pasteSuccess = $('#pasteSuccess'); $pasteSuccess = $('#pasteSuccess');
// $pasteUrl is saved in me.createPasteNotification() after creation // $pasteUrl is saved in me.createPasteNotification() after creation
$remainingTime = $('#remainingtime'); $remainingTime = $('#remainingtime');
$shortenButton = $('#shortenbutton');
// bind elements // bind elements
$shortenButton.click(sendToShortener); $shortenButton.click(sendToShortener);
@ -1400,9 +1400,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var Prompt = (function (window, document) { var Prompt = (function (window, document) {
var me = {}; var me = {};
var $passwordModal, var $passwordDecrypt,
$passwordForm, $passwordForm,
$passwordDecrypt; $passwordModal;
var password = '', var password = '',
passwordCallback = null; passwordCallback = null;
@ -1504,9 +1504,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
*/ */
me.init = function() me.init = function()
{ {
$passwordModal = $('#passwordmodal');
$passwordForm = $('#passwordform');
$passwordDecrypt = $('#passworddecrypt'); $passwordDecrypt = $('#passworddecrypt');
$passwordForm = $('#passwordform');
$passwordModal = $('#passwordmodal');
// bind events // bind events
@ -1533,10 +1533,10 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var Editor = (function (window, document) { var Editor = (function (window, document) {
var me = {}; var me = {};
var $message, var $editorTabs,
$messageEdit, $messageEdit,
$messagePreview, $messagePreview,
$editorTabs; $message;
var isPreview = false; var isPreview = false;
@ -1722,8 +1722,8 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
*/ */
me.init = function() me.init = function()
{ {
$message = $('#message');
$editorTabs = $('#editorTabs'); $editorTabs = $('#editorTabs');
$message = $('#message');
// bind events // bind events
$message.keydown(supportTabs); $message.keydown(supportTabs);
@ -1747,10 +1747,10 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var PasteViewer = (function (window, document) { var PasteViewer = (function (window, document) {
var me = {}; var me = {};
var $plainText, var $placeholder,
$placeholder,
$prettyMessage, $prettyMessage,
$prettyPrint; $prettyPrint,
$plainText;
var text, var text,
format = 'plaintext', format = 'plaintext',
@ -1961,8 +1961,8 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
*/ */
me.init = function() me.init = function()
{ {
$plainText = $('#plaintext');
$placeholder = $('#placeholder'); $placeholder = $('#placeholder');
$plainText = $('#plaintext');
$prettyMessage = $('#prettymessage'); $prettyMessage = $('#prettymessage');
$prettyPrint = $('#prettyprint'); $prettyPrint = $('#prettyprint');
@ -1997,9 +1997,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var AttachmentViewer = (function (window, document) { var AttachmentViewer = (function (window, document) {
var me = {}; var me = {};
var $attachment, var $attachmentLink,
$attachmentLink, $attachmentPreview,
$attachmentPreview; $attachment;
var attachmentChanged = false, var attachmentChanged = false,
attachmentHasPreview = false; attachmentHasPreview = false;
@ -2148,9 +2148,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
*/ */
me.init = function() me.init = function()
{ {
$attachmentPreview = $('#attachmentPreview');
$attachment = $('#attachment'); $attachment = $('#attachment');
$attachmentLink = $('#attachment a'); $attachmentLink = $('#attachment a');
$attachmentPreview = $('#attachmentPreview');
}; };
return me; return me;
@ -2166,13 +2166,13 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
var DiscussionViewer = (function (window, document) { var DiscussionViewer = (function (window, document) {
var me = {}; var me = {};
var $commentContainer, var $commentTail,
$commentTail,
$discussion, $discussion,
$reply, $reply,
$replyMessage, $replyMessage,
$replyNickname, $replyNickname,
$replyStatus; $replyStatus,
$commentContainer;
var replyCommentId; var replyCommentId;
@ -2457,15 +2457,15 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
$customAttachment, $customAttachment,
$expiration, $expiration,
$fileRemoveButton, $fileRemoveButton,
$fileWrap;
$formatter, $formatter,
$newButton, $newButton,
$openDiscussionOption,
$openDiscussion, $openDiscussion,
$openDiscussionOption,
$password, $password,
$passwordInput, $passwordInput,
$rawTextButton, $rawTextButton,
$sendButton, $sendButton;
$fileWrap;
var pasteExpiration = '1week'; var pasteExpiration = '1week';
@ -2922,15 +2922,15 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
$customAttachment = $('#customattachment'); $customAttachment = $('#customattachment');
$expiration = $('#expiration'); $expiration = $('#expiration');
$fileRemoveButton = $('#fileremovebutton'); $fileRemoveButton = $('#fileremovebutton');
$fileWrap = $('#filewrap');
$formatter = $('#formatter'); $formatter = $('#formatter');
$newButton = $('#newbutton'); $newButton = $('#newbutton');
$openDiscussionOption = $('#opendiscussionoption');
$openDiscussion = $('#opendiscussion'); $openDiscussion = $('#opendiscussion');
$openDiscussionOption = $('#opendiscussionoption');
$password = $('#password'); $password = $('#password');
$passwordInput = $('#passwordinput'); $passwordInput = $('#passwordinput');
$rawTextButton = $('#rawtextbutton'); $rawTextButton = $('#rawtextbutton');
$sendButton = $('#sendbutton'); $sendButton = $('#sendbutton');
$fileWrap = $('#filewrap');
// bootstrap template drop down // bootstrap template drop down
$('#language ul.dropdown-menu li a').click(setLanguage); $('#language ul.dropdown-menu li a').click(setLanguage);
@ -4000,19 +4000,20 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
// initialize other modules/"classes" // initialize other modules/"classes"
Alert.init(); Alert.init();
Uploader.init();
Model.init(); Model.init();
AttachmentViewer.init();
CryptTool.init(); CryptTool.init();
UiHelper.init(); DiscussionViewer.init();
TopNav.init();
Editor.init(); Editor.init();
PasteDecrypter.init();
PasteEncrypter.init();
PasteStatus.init(); PasteStatus.init();
PasteViewer.init(); PasteViewer.init();
AttachmentViewer.init();
DiscussionViewer.init();
PasteEncrypter.init();
PasteDecrypter.init();
Prompt.init(); Prompt.init();
TopNav.init();
UiHelper.init();
Uploader.init();
// display an existing paste // display an existing paste
if (Model.hasCipherData()) { if (Model.hasCipherData()) {
@ -4027,16 +4028,22 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
})(window, document); })(window, document);
return { return {
Editor: Editor,
Helper: Helper, Helper: Helper,
I18n: I18n, I18n: I18n,
CryptTool: CryptTool, CryptTool: CryptTool,
TopNav: TopNav, Model: Model,
UiHelper: UiHelper,
Alert: Alert, Alert: Alert,
Uploader: Uploader, PasteStatus: PasteStatus,
Controller: Controller, Prompt: Prompt,
DiscussionViewer: DiscussionViewer, Editor: Editor,
PasteViewer: PasteViewer, PasteViewer: PasteViewer,
AttachmentViewer: AttachmentViewer AttachmentViewer: AttachmentViewer,
DiscussionViewer: DiscussionViewer,
TopNav: TopNav,
Uploader: Uploader,
PasteEncrypter: PasteEncrypter,
PasteDecrypter: PasteDecrypter,
Controller: Controller
}; };
}(jQuery, sjcl, Base64, RawDeflate); }(jQuery, sjcl, Base64, RawDeflate);