remove some unused styles
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
function UploadManager(apiAddress, uploadsFinished) {
|
function UploadManager(uploadEndpoint, uploadsFinished) {
|
||||||
this.apiAddress = apiAddress;
|
this.uploadEndpoint = uploadEndpoint;
|
||||||
|
|
||||||
// Callback function for when the queue is empty
|
// Callback function for when the queue is empty
|
||||||
this.uploadsFinished = uploadsFinished;
|
this.uploadsFinished = uploadsFinished;
|
||||||
@@ -99,11 +99,10 @@ UploadManager.prototype.uploadThread = function() {
|
|||||||
console.debug("Starting upload of " + job.name);
|
console.debug("Starting upload of " + job.name);
|
||||||
|
|
||||||
let form = new FormData();
|
let form = new FormData();
|
||||||
form.append("name", job.name);
|
|
||||||
form.append('file', job.file);
|
form.append('file', job.file);
|
||||||
|
|
||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", this.apiAddress + "/file", true);
|
xhr.open("POST", this.uploadEndpoint, true);
|
||||||
xhr.timeout = 21600000; // 6 hours, to account for slow connections
|
xhr.timeout = 21600000; // 6 hours, to account for slow connections
|
||||||
|
|
||||||
// Report progress updates back to the caller
|
// Report progress updates back to the caller
|
||||||
|
@@ -31,10 +31,9 @@ let uploadsStr = localStorage.getItem("uploaded_files")
|
|||||||
if (uploadsStr === null) { uploadsStr = "" }
|
if (uploadsStr === null) { uploadsStr = "" }
|
||||||
|
|
||||||
let uploads = Array()
|
let uploads = Array()
|
||||||
|
|
||||||
if (uploadsStr != "") {
|
if (uploadsStr != "") {
|
||||||
uploadsStr = uploadsStr.slice(0, -1) // Strip the trailing comma
|
// Strip the trailing comma
|
||||||
uploads = uploadsStr.split(",")
|
uploads = uploadsStr.slice(0, -1).split(",")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the uploads from a cookie
|
// Get the uploads from a cookie
|
||||||
|
@@ -75,7 +75,7 @@ let shareLink = ""
|
|||||||
|
|
||||||
function handleUploads(files) {
|
function handleUploads(files) {
|
||||||
if (uploader === null){
|
if (uploader === null){
|
||||||
uploader = new UploadManager(apiEndpoint, uploadsFinished)
|
uploader = new UploadManager(apiEndpoint+"/file", uploadsFinished)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (files.length === 0) {
|
if (files.length === 0) {
|
||||||
|
@@ -9,7 +9,7 @@ function uploadText() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
new UploadManager(apiEndpoint, null).addFile(
|
new UploadManager(apiEndpoint+"/file", null).addFile(
|
||||||
blob,
|
blob,
|
||||||
filename,
|
filename,
|
||||||
null,
|
null,
|
||||||
|
@@ -296,33 +296,6 @@ pre{
|
|||||||
font-size: 1.8em;
|
font-size: 1.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress_bar{
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 0;
|
|
||||||
background-color: #555;
|
|
||||||
overflow: hidden;
|
|
||||||
color: #eeeeee;
|
|
||||||
text-align: left;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.progressbar_inner{
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
width: 0%;
|
|
||||||
left: 0;
|
|
||||||
height: 100%;
|
|
||||||
background-color: var(--highlight_color);;
|
|
||||||
overflow: hidden;
|
|
||||||
color: #000;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.progress_text{
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.file_button{
|
.file_button{
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
Reference in New Issue
Block a user