Merge commit '15935ec673c770a63e6185b2ba3a9d62eb516811'
This commit is contained in:
commit
b75cbc5cab
@ -519,7 +519,7 @@ Settings =
|
||||
$.id('lastarchivecheck').textContent = 'never'
|
||||
|
||||
items = {}
|
||||
for name in ['archiveLists', 'archiveAutoUpdate', 'captchaLanguage', 'boardnav', 'time', 'timeLocale', 'backlink', 'fileInfo', 'QR.personas', 'favicon', 'usercss', 'customCooldown', 'jsWhitelist']
|
||||
for name in ['archiveLists', 'archiveAutoUpdate', 'captchaLanguage', 'boardnav', 'time', 'timeLocale', 'backlink', 'pastedname', 'fileInfo', 'QR.personas', 'favicon', 'usercss', 'customCooldown', 'jsWhitelist']
|
||||
items[name] = Conf[name]
|
||||
input = inputs[name]
|
||||
event = if name in ['archiveLists', 'archiveAutoUpdate', 'QR.personas', 'favicon', 'usercss'] then 'change' else 'input'
|
||||
@ -678,6 +678,9 @@ Settings =
|
||||
backlink: ->
|
||||
@nextElementSibling.textContent = @value.replace /%(?:id|%)/g, (x) -> ({'%id': '123456789', '%%': '%'})[x]
|
||||
|
||||
pastedname: ->
|
||||
@nextElementSibling.textContent = "#{@value}.png"
|
||||
|
||||
fileInfo: ->
|
||||
data =
|
||||
isReply: true
|
||||
|
||||
@ -72,6 +72,11 @@
|
||||
<div><input name="backlink" class="field" spellcheck="false">: <span class="backlink-preview"></span></div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Default pasted content filename</legend>
|
||||
<div><input name="pastedname" class="field" spellcheck="false">: <span class="pastedname-preview"></span></div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>File Info Formatting <span class="warning" data-feature="File Info Formatting">is disabled.</span></legend>
|
||||
<div><input name="fileInfo" class="field" spellcheck="false">: <span class="file-info file-info-preview"></span></div>
|
||||
|
||||
@ -385,7 +385,8 @@ QR =
|
||||
if file
|
||||
{type} = file
|
||||
blob = new Blob [file], {type}
|
||||
blob.name = "file.#{QR.extensionFromType[type] or 'jpg'}"
|
||||
pastedname = Conf['pastedname']
|
||||
blob.name = "#{pastedname}.#{QR.extensionFromType[type] or 'jpg'}"
|
||||
QR.open()
|
||||
QR.handleFiles [blob]
|
||||
$.addClass QR.nodes.el, 'dump'
|
||||
@ -404,7 +405,8 @@ QR =
|
||||
for i in [0...bstr.length]
|
||||
arr[i] = bstr.charCodeAt(i)
|
||||
blob = new Blob [arr], {type: m[1]}
|
||||
blob.name = "file.#{m[2]}"
|
||||
pastedname = Conf['pastedname']
|
||||
blob.name = "#{pastedname}.#{m[2]}"
|
||||
QR.handleFiles [blob]
|
||||
else if /^https?:\/\//.test src
|
||||
QR.handleUrl src
|
||||
|
||||
@ -851,6 +851,8 @@ Config =
|
||||
|
||||
backlink: '>>%id'
|
||||
|
||||
pastedname: 'file'
|
||||
|
||||
fileInfo: '%l %d (%p%s, %r%g)'
|
||||
|
||||
favicon: 'ferongr'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user