Remove 'Open Post in New Tab' option. #904

This commit is contained in:
ccd0 2016-06-17 22:53:27 -07:00
parent b552e2c95b
commit 02e9089f96
2 changed files with 7 additions and 17 deletions

View File

@ -775,33 +775,28 @@ QR =
QR.cooldown.add threadID, postID QR.cooldown.add threadID, postID
URL = if threadID is postID # new thread url = if threadID is postID # new thread
"#{window.location.origin}/#{g.BOARD}/thread/#{threadID}" "#{window.location.origin}/#{g.BOARD}/thread/#{threadID}"
else if g.VIEW is 'index' and lastPostToThread and Conf['Open Post in New Tab'] # replying from the index else if g.VIEW is 'index' and lastPostToThread # replying from the index
"#{window.location.origin}/#{g.BOARD}/thread/#{threadID}#p#{postID}" "#{window.location.origin}/#{g.BOARD}/thread/#{threadID}#p#{postID}"
if URL if url
open = if Conf['Open Post in New Tab'] or postsCount
-> $.open URL
else
-> window.location = URL
if threadID is postID if threadID is postID
# XXX 4chan sometimes responds before the thread exists. # XXX 4chan sometimes responds before the thread exists.
QR.waitForThread URL, open QR.waitForThread url
else else
open() $.open url
QR.status() QR.status()
waitForThread: (url, cb) -> waitForThread: (url) ->
attempts = 0 attempts = 0
check = -> check = ->
$.ajax url, $.ajax url,
onloadend: -> onloadend: ->
attempts++ attempts++
if attempts >= 6 or @status is 200 if attempts >= 6 or @status is 200
cb() $.open url
else else
setTimeout check, attempts * $.SECOND setTimeout check, attempts * $.SECOND
, ,

View File

@ -417,11 +417,6 @@ Config =
'Automatically hide the quick reply when posting.' 'Automatically hide the quick reply when posting.'
1 1
] ]
'Open Post in New Tab': [
true
'Open new threads or replies to a thread from the index in a new tab.'
1
]
'Remember QR Size': [ 'Remember QR Size': [
false false
'Remember the size of the Quick reply.' 'Remember the size of the Quick reply.'