Updated home

Removed "dz-thumbnail" alt from dropzone's template and slightly changed ShareX's config template.
This commit is contained in:
Bobby Wibowo 2018-04-26 20:14:18 +07:00
parent 976e96c14f
commit 21bf3b59c2
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
3 changed files with 16 additions and 15 deletions

View File

@ -260,19 +260,20 @@ upload.showThumbnail = (file, url) => {
upload.prepareShareX = () => {
if (upload.token) {
const sharexElement = document.getElementById('ShareX')
const sharexFile = `{\r\n\
"Name": "${location.hostname}",\r\n\
"DestinationType": "ImageUploader, FileUploader",\r\n\
"RequestType": "POST",\r\n\
"RequestURL": "${location.origin}/api/upload",\r\n\
"FileFormName": "files[]",\r\n\
"Headers": {\r\n\
"token": "${upload.token}"\r\n\
},\r\n\
"ResponseType": "Text",\r\n\
"URL": "$json:files[0].url$",\r\n\
"ThumbnailURL": "$json:files[0].url$"\r\n\
}`
const sharexFile =
'{\r\n' +
` "Name": "${location.hostname}",\r\n` +
' "DestinationType": "ImageUploader, FileUploader",\r\n' +
' "RequestType": "POST",\r\n' +
` "RequestURL": "${location.origin}/api/upload",\r\n` +
' "FileFormName": "files[]",\r\n' +
' "Headers": {\r\n' +
` "token": "${upload.token}"\r\n` +
' },\r\n' +
' "ResponseType": "Text",\r\n' +
' "URL": "$json:files[0].url$",\r\n' +
' "ThumbnailURL": "$json:files[0].url$"\r\n' +
'}'
const sharexBlob = new Blob([sharexFile], { type: 'application/octet-binary' })
sharexElement.setAttribute('href', URL.createObjectURL(sharexBlob))
sharexElement.setAttribute('download', `${location.hostname}.sxcu`)

View File

@ -12,7 +12,7 @@
v1: CSS and JS files.
v2: Images and config files (manifest.json, browserconfig.xml, etcetera).
#}
{% set v1 = "fIs0W2GsiU" %}
{% set v1 = "MSEpgpfFIQ" %}
{% set v2 = "MSEpgpfFIQ" %}
{#

View File

@ -50,7 +50,7 @@
<div class="column is-hidden-mobile"></div>
<div class="column">
<progress class="progress is-small is-danger" value="0" max="100"></progress>
<img class="is-unselectable" alt="dz-thumbnail" data-dz-thumbnail>
<img class="is-unselectable" data-dz-thumbnail>
<p class="error"></p>
<p class="link" style="display: none">
<a target="_blank" rel="noopener"></a>