Remove support for files in replies on /f/. #803
This commit is contained in:
parent
3590fa15f3
commit
f8124c4489
@ -83,9 +83,6 @@ ThreadUpdater =
|
|||||||
|
|
||||||
ThreadUpdater.setInterval()
|
ThreadUpdater.setInterval()
|
||||||
|
|
||||||
# Update immediately on /f/ to add files to replies.
|
|
||||||
ThreadUpdater.update() if @board.ID is 'f'
|
|
||||||
|
|
||||||
###
|
###
|
||||||
http://freesound.org/people/pierrecartoons1979/sounds/90112/
|
http://freesound.org/people/pierrecartoons1979/sounds/90112/
|
||||||
cc-by-nc-3.0
|
cc-by-nc-3.0
|
||||||
@ -282,13 +279,6 @@ ThreadUpdater =
|
|||||||
index.push ID
|
index.push ID
|
||||||
files.push ID if postObject.fsize
|
files.push ID if postObject.fsize
|
||||||
|
|
||||||
# Add files to replies on /f/.
|
|
||||||
if board.ID is 'f' and postObject.fsize and (post = thread.posts[ID]) and not post.file
|
|
||||||
node = Build.postFromObject postObject, board.ID
|
|
||||||
$.after post.nodes.info, $('.file', node)
|
|
||||||
post.parseFile()
|
|
||||||
Post.callbacks.execute post, ['Filter', 'File Info Formatting', 'Fappe Tyme', 'Sauce']
|
|
||||||
|
|
||||||
# Insert new posts, not older ones.
|
# Insert new posts, not older ones.
|
||||||
continue if ID <= lastPost
|
continue if ID <= lastPost
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,6 @@ QR.post = class
|
|||||||
when 'thread'
|
when 'thread'
|
||||||
(if @thread isnt 'new' then $.addClass else $.rmClass) QR.nodes.el, 'reply-to-thread'
|
(if @thread isnt 'new' then $.addClass else $.rmClass) QR.nodes.el, 'reply-to-thread'
|
||||||
QR.status()
|
QR.status()
|
||||||
@updateFlashURL()
|
|
||||||
when 'com'
|
when 'com'
|
||||||
@updateComment()
|
@updateComment()
|
||||||
# Disable auto-posting if you're typing in the first post
|
# Disable auto-posting if you're typing in the first post
|
||||||
@ -133,7 +132,6 @@ QR.post = class
|
|||||||
return unless @file
|
return unless @file
|
||||||
@saveFilename()
|
@saveFilename()
|
||||||
@updateFilename()
|
@updateFilename()
|
||||||
@updateFlashURL()
|
|
||||||
when 'name'
|
when 'name'
|
||||||
QR.persona.set @
|
QR.persona.set @
|
||||||
|
|
||||||
@ -205,7 +203,6 @@ QR.post = class
|
|||||||
@showFileData()
|
@showFileData()
|
||||||
else
|
else
|
||||||
@updateFilename()
|
@updateFilename()
|
||||||
@updateFlashURL()
|
|
||||||
@nodes.el.style.backgroundImage = null
|
@nodes.el.style.backgroundImage = null
|
||||||
unless @file.type in QR.mimeTypes
|
unless @file.type in QR.mimeTypes
|
||||||
@fileError 'Unsupported file type.'
|
@fileError 'Unsupported file type.'
|
||||||
@ -305,7 +302,6 @@ QR.post = class
|
|||||||
@nodes.el.style.backgroundImage = null
|
@nodes.el.style.backgroundImage = null
|
||||||
$.rmClass @nodes.el, 'has-file'
|
$.rmClass @nodes.el, 'has-file'
|
||||||
@showFileData()
|
@showFileData()
|
||||||
@updateFlashURL()
|
|
||||||
URL.revokeObjectURL @URL
|
URL.revokeObjectURL @URL
|
||||||
@dismissErrors (error) -> $.hasClass error, 'file-error'
|
@dismissErrors (error) -> $.hasClass error, 'file-error'
|
||||||
|
|
||||||
@ -336,25 +332,6 @@ QR.post = class
|
|||||||
QR.nodes.fileSubmit.removeAttribute 'data-source'
|
QR.nodes.fileSubmit.removeAttribute 'data-source'
|
||||||
QR.nodes.spoiler.checked = @spoiler
|
QR.nodes.spoiler.checked = @spoiler
|
||||||
|
|
||||||
updateFlashURL: ->
|
|
||||||
return unless g.BOARD.ID is 'f'
|
|
||||||
if @thread is 'new' or !@file
|
|
||||||
url = ''
|
|
||||||
else
|
|
||||||
url = @file.newName
|
|
||||||
url = url.replace(/"/g, '%22') if $.engine in ['blink', 'webkit']
|
|
||||||
url = url
|
|
||||||
.replace(/[\t\n\f\r \xa0\u200B\u2029\u3000]+/g, ' ')
|
|
||||||
.replace(/(^ | $)/g, '')
|
|
||||||
.replace(/\.[0-9A-Za-z]+$/, '')
|
|
||||||
url = "https://i.4cdn.org/f/#{encodeURIComponent E url}.swf\n"
|
|
||||||
oldURL = @flashURL or ''
|
|
||||||
if url isnt oldURL
|
|
||||||
com = @com or ''
|
|
||||||
if com[...oldURL.length] is oldURL
|
|
||||||
@setComment url + com[oldURL.length..]
|
|
||||||
@flashURL = url
|
|
||||||
|
|
||||||
pasteText: (file) ->
|
pasteText: (file) ->
|
||||||
@pasting = true
|
@pasting = true
|
||||||
reader = new FileReader()
|
reader = new FileReader()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user