add disabled option when Foolz Beta is the only archive
This commit is contained in:
parent
6a09974117
commit
50549863f3
@ -7,9 +7,9 @@ Redirect =
|
||||
|
||||
archives = {}
|
||||
for data in Redirect.archives
|
||||
{name, boards, files, software} = data
|
||||
{name, boards, files, software, withCredentials} = data
|
||||
archives[name] = data
|
||||
for boardID in boards
|
||||
for boardID in boards when !withCredentials
|
||||
o.thread[boardID] = data unless boardID of o.thread
|
||||
o.post[boardID] = data unless boardID of o.post or software isnt 'foolfuuka'
|
||||
o.file[boardID] = data unless boardID of o.file or boardID not in files
|
||||
|
||||
@ -307,15 +307,21 @@ Settings =
|
||||
$.on $.id('apply-css'), 'click', Settings.usercss
|
||||
|
||||
archBoards = {}
|
||||
for {name, boards, files, software} in Redirect.archives
|
||||
for {name, boards, files, software, withCredentials} in Redirect.archives
|
||||
for boardID in boards
|
||||
o = archBoards[boardID] or=
|
||||
thread: []
|
||||
post: []
|
||||
file: []
|
||||
o.thread.push name
|
||||
o.post.push name if software is 'foolfuuka'
|
||||
o.file.push name if boardID in files
|
||||
thread: [[], []]
|
||||
post: [[], []]
|
||||
file: [[], []]
|
||||
i = +!!withCredentials
|
||||
o.thread[i].push name
|
||||
o.post[i].push name if software is 'foolfuuka'
|
||||
o.file[i].push name if boardID in files
|
||||
for boardID, o of archBoards
|
||||
for item in ['thread', 'post', 'file']
|
||||
if o[item][0].length is 0 and o[item][1].length isnt 0
|
||||
o[item][0].push 'disabled'
|
||||
o[item] = o[item][0].concat(o[item][1])
|
||||
|
||||
rows = []
|
||||
boardOptions = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user