Whitespace cleanup

This commit is contained in:
Andre D 2015-06-10 11:45:02 -04:00
parent c24b3a5f1b
commit 3225d23e82
4 changed files with 167 additions and 170 deletions

View file

@ -11,8 +11,7 @@
margin: 0;
padding: 0;
font-family: Sans-Serif;
overflow: auto;
overflow: auto;
}
body {
@ -32,14 +31,14 @@
transition: background-color 400ms ease-out;
}
.contentarea h1:hover {
background-color: #313538;
-webkit-transition: background-color 100ms ease-in;
-moz-transition: background-color 100ms ease-in;
-o-transition: background-color 100ms ease-in;
-ms-transition: background-color 100ms ease-in;
transition: background-color 100ms ease-in;
}
.contentarea h1:hover {
background-color: #313538;
-webkit-transition: background-color 100ms ease-in;
-moz-transition: background-color 100ms ease-in;
-o-transition: background-color 100ms ease-in;
-ms-transition: background-color 100ms ease-in;
transition: background-color 100ms ease-in;
}
.contentarea {
width: 200px;
@ -62,50 +61,50 @@
}
#viewswitcher {
width: 90px;
height: 40px;
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
border: 2px solid white;
width: 90px;
height: 40px;
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
border: 2px solid white;
}
#viewswitcher h3 {
color: white;
text-align: center;
vertical-align: middle;
line-height: 40px;
margin: 0;
-webkit-transition: background-color 400ms ease-out;
-moz-transition: background-color 400ms ease-out;
-o-transition: background-color 400ms ease-out;
-ms-transition: background-color 400ms ease-out;
transition: background-color 400ms ease-out;
}
#viewswitcher h3:hover {
background-color: #313538;
-webkit-transition: background-color 100ms ease-in;
-moz-transition: background-color 100ms ease-in;
-o-transition: background-color 100ms ease-in;
-ms-transition: background-color 100ms ease-in;
transition: background-color 100ms ease-in;
}
#viewswitcher h3 {
color: white;
text-align: center;
vertical-align: middle;
line-height: 40px;
margin: 0;
-webkit-transition: background-color 400ms ease-out;
-moz-transition: background-color 400ms ease-out;
-o-transition: background-color 400ms ease-out;
-ms-transition: background-color 400ms ease-out;
transition: background-color 400ms ease-out;
}
#viewswitcher h3:hover {
background-color: #313538;
-webkit-transition: background-color 100ms ease-in;
-moz-transition: background-color 100ms ease-in;
-o-transition: background-color 100ms ease-in;
-ms-transition: background-color 100ms ease-in;
transition: background-color 100ms ease-in;
}
#footer {
position: absolute;
width: 100%;
bottom: 10px;
margin: auto;
text-align: center;
}
#footer a {
color: #aaa;
font-size: 14px;
position: absolute;
width: 100%;
bottom: 10px;
margin: auto;
text-align: center;
}
#footer a {
color: #aaa;
font-size: 14px;
}
progress {
width: 100%;
position: relative;
@ -146,16 +145,16 @@
margin: 0 auto;
}
#previewimg img:not(.dragged) {
max-width: 100vw;
max-height: 100vh;
}
#downloadview .preview {
display: block;
margin: 0 auto;
#previewimg img:not(.dragged) {
max-width: 100vw;
max-height: 100vh;
}
#downloadview .preview {
display: block;
margin: 0 auto;
}
audio.preview, video.preview, #downloadprogress, #previewimg {
position: relative;
@ -182,10 +181,8 @@
#previewtext {
position: absolute;
top: 47px;
width: 100%;
height: calc(100% - 110px);
overflow: auto;
}
@ -194,27 +191,27 @@
padding-left: 50px;
}
#previewtext code {
background: none;
margin: 0;
overflow: visible;
}
#previewtext>textarea {
background: transparent none repeat scroll 0% 0%;
border: 0px none;
padding: 0px;
font-family: monospace;
outline: medium none;
resize: none;
margin: 0;
padding-top: 5px;
padding-left: 50px;
font-size: 13px;
width: calc(100% - 50px);
height: calc(100% - 5px);
color: white;
}
#previewtext code {
background: none;
margin: 0;
overflow: visible;
}
#previewtext > textarea {
background: transparent none repeat scroll 0% 0%;
border: 0px none;
padding: 0px;
font-family: monospace;
outline: medium none;
resize: none;
margin: 0;
padding-top: 5px;
padding-left: 50px;
font-size: 13px;
width: calc(100% - 50px);
height: calc(100% - 5px);
color: white;
}
.hidden {
display: none !important;
@ -237,7 +234,7 @@
white-space: nowrap;
overflow: hidden;
}
input#filename {
position: fixed;
font-size: 16px;
@ -293,9 +290,9 @@
color: white;
}
.btn:hover {
opacity: 1;
}
.btn:hover {
opacity: 1;
}
#linenos {
color: #7d7d7d;
@ -330,10 +327,10 @@
</head>
<body>
<div id="viewswitcher">
<h3 id="text">Text</h3>
<h3 id="save" class="hidden">Save</h3>
<h3 id="text">Text</h3>
<h3 id="save" class="hidden">Save</h3>
</div>
<div class="contentarea" id="uploadview">
<div id="pastearea">
<h1>Upload</h1>
@ -351,15 +348,15 @@
</div>
<div id="textview" class="hidden">
<input id="filename" type="text" value="Pasted Text.txt">
<div id="previewtext" class="preview">
<div id="linenos">
&gt;
<input id="filename" type="text" value="Pasted Text.txt">
<div id="previewtext" class="preview">
<div id="linenos">
&gt;
</div>
<textarea></textarea>
</div>
<textarea></textarea>
</div>
</div>
<div id="downloadview" class="hidden">
@ -387,7 +384,7 @@
</div>
</div>
</div>
<div id="footer">
<a href="https://github.com/Upload/Upload" target="_blank">Source Code</a>
</div>

View file

@ -12,7 +12,7 @@ $(function () {
var dlbtn = $('#dlbtn')
var deletebtn = $('#deletebtn')
var viewbtn = $('#inbrowserbtn')
function hashchanged() {
if (window.location.hash && window.location.hash != '#') {
upview.addClass('hidden')
@ -29,9 +29,9 @@ $(function () {
console.log("bbb");
previewfilename.text(data.header.name)
console.log(data.header.name)
var url = URL.createObjectURL(data.decrypted)
viewbtn.prop('href', url)
@ -45,7 +45,7 @@ $(function () {
var fr = new FileReader()
fr.onload = function () {
var text = fr.result
previewtext.removeClass('hidden')
@ -61,7 +61,7 @@ $(function () {
}
}
fr.readAsText (data.decrypted)
fr.readAsText(data.decrypted)
} else if (data.header.mime.startsWith('video/')) {
details.find('video.preview').removeClass('hidden').prop('src', url)
} else if (data.header.mime.startsWith('audio/')) {
@ -74,7 +74,7 @@ $(function () {
}
function downloaded() {
console.log("aaa");
console.log("aaa");
$('#downloadprogress').text('Decrypting')
crypt.decrypt(this.response, seed).done(embed)
}

View file

@ -60,12 +60,12 @@ $(function () {
if (!dragging) {
return
}
e.preventDefault();
var newx = e.pageX - lastx
var newy = e.pageY - lasty
var width = dragging.width()
var height = dragging.height()

View file

@ -1,76 +1,76 @@
$(function() {
var viewswitcher = $('#viewswitcher');
var vs_text = $('#viewswitcher>#text');
var vs_save = $('#viewswitcher>#save');
var uploadview = $('#uploadview');
var textview = $('#textview');
var textarea = $('#previewtext>textarea');
var filename = $('input#filename');
var pastearea = $('#pastearea')
var uploadprogress = $('#uploadprogress')
var filepicker = $('#filepicker')
var progress = $('#progressamount')
var progressbg = $('#progressamountbg')
function progressdo(e) {
var percent = (e.loaded / e.total) * 100
progressbg.css('width', percent + '%');
progress.text(Math.floor(percent) + '%')
}
function encrypted(data) {
var formdata = new FormData()
formdata.append('privkey', 'c61540b5ceecd05092799f936e27755f')
formdata.append('ident', data.ident)
formdata.append('file', data.encrypted)
$.ajax({
url: (g.config.server ? g.config.server : '') + 'up',
$(function () {
var viewswitcher = $('#viewswitcher');
var vs_text = $('#viewswitcher>#text');
var vs_save = $('#viewswitcher>#save');
var uploadview = $('#uploadview');
var textview = $('#textview');
var textarea = $('#previewtext>textarea');
var filename = $('input#filename');
var pastearea = $('#pastearea')
var uploadprogress = $('#uploadprogress')
var filepicker = $('#filepicker')
var progress = $('#progressamount')
var progressbg = $('#progressamountbg')
function progressdo(e) {
var percent = (e.loaded / e.total) * 100
progressbg.css('width', percent + '%');
progress.text(Math.floor(percent) + '%')
}
function encrypted(data) {
var formdata = new FormData()
formdata.append('privkey', 'c61540b5ceecd05092799f936e27755f')
formdata.append('ident', data.ident)
formdata.append('file', data.encrypted)
$.ajax({
url: (g.config.server ? g.config.server : '') + 'up',
data: formdata,
cache: false,
processData: false,
contentType: false,
dataType: 'json',
xhr: function () {
var xhr = new XMLHttpRequest()
xhr.upload.addEventListener('progress', progressdo, false)
return xhr
var xhr = new XMLHttpRequest()
xhr.upload.addEventListener('progress', progressdo, false)
return xhr
},
type: 'POST'
}).done(function (response) {
progressbg.css('width', 0);
pastearea.removeClass('hidden')
uploadprogress.addClass('hidden')
localStorage.setItem('delete-' + data.ident, response.delkey)
window.location = '#' + data.seed
})
}
function doupload(file) {
viewswitcher.addClass('hidden');
textview.addClass('hidden');
vs_save.addClass("hidden");
vs_text.removeClass("hidden");
textarea.val('');
uploadprogress.removeClass('hidden');
progress.text('Encrypting');
crypt.encrypt(file).done(encrypted);
}
viewswitcher.click(function() {
if (vs_text.hasClass("hidden")) {
if (textarea.val() != "")
doupload(new Blob([textarea.val()], { type: 'text/plain', name: filename.val() || "Pasted Text.txt" }))
} else {
vs_text.addClass("hidden");
uploadview.addClass("hidden");
vs_save.removeClass("hidden");
textview.removeClass("hidden");
textarea.select();
}).done(function (response) {
progressbg.css('width', 0);
pastearea.removeClass('hidden')
uploadprogress.addClass('hidden')
localStorage.setItem('delete-' + data.ident, response.delkey)
window.location = '#' + data.seed
})
}
});
function doupload(file) {
viewswitcher.addClass('hidden');
textview.addClass('hidden');
vs_save.addClass("hidden");
vs_text.removeClass("hidden");
textarea.val('');
uploadprogress.removeClass('hidden');
progress.text('Encrypting');
crypt.encrypt(file).done(encrypted);
}
viewswitcher.click(function () {
if (vs_text.hasClass("hidden")) {
if (textarea.val() != "")
doupload(new Blob([textarea.val()], { type: 'text/plain', name: filename.val() || "Pasted Text.txt" }))
} else {
vs_text.addClass("hidden");
uploadview.addClass("hidden");
vs_save.removeClass("hidden");
textview.removeClass("hidden");
textarea.select();
}
});
})