archive features should be disableable

This commit is contained in:
ccd0 2014-08-08 21:24:41 -07:00
parent 3d32a205d9
commit 4d40b30c28
3 changed files with 3 additions and 2 deletions

View File

@ -131,6 +131,7 @@ Get =
Main.callbackNodes Post, [post]
Get.insert post, root, context
archivedPost: (boardID, postID, root, context) ->
return false unless Conf['Resurrect Quotes']
return false unless url = Redirect.to 'post', {boardID, postID}
if /^https:\/\//.test(URL) or location.protocol is 'http:'
$.cache url,

View File

@ -12,7 +12,7 @@ ImageCommon =
URL = Redirect.to 'file',
boardID: post.board.ID
filename: src[src.length - 1]
unless URL and Redirect.securityCheck URL
unless Conf['404 Redirect'] and URL and Redirect.securityCheck URL
URL = null
return cb URL if (post.isDead or post.file.isDead) and file.src.split('/')[2] is 'i.4cdn.org'

View File

@ -157,7 +157,7 @@ ThreadWatcher =
href: 'javascript:;'
$.on x, 'click', ThreadWatcher.cb.rm
if data.isDead
if Conf['404 Redirect'] and data.isDead
href = Redirect.to 'thread', {boardID, threadID}
link = $.el 'a',
href: href or "/#{boardID}/thread/#{threadID}"