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 = {}
|
archives = {}
|
||||||
for data in Redirect.archives
|
for data in Redirect.archives
|
||||||
{name, boards, files, software} = data
|
{name, boards, files, software, withCredentials} = data
|
||||||
archives[name] = data
|
archives[name] = data
|
||||||
for boardID in boards
|
for boardID in boards when !withCredentials
|
||||||
o.thread[boardID] = data unless boardID of o.thread
|
o.thread[boardID] = data unless boardID of o.thread
|
||||||
o.post[boardID] = data unless boardID of o.post or software isnt 'foolfuuka'
|
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
|
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
|
$.on $.id('apply-css'), 'click', Settings.usercss
|
||||||
|
|
||||||
archBoards = {}
|
archBoards = {}
|
||||||
for {name, boards, files, software} in Redirect.archives
|
for {name, boards, files, software, withCredentials} in Redirect.archives
|
||||||
for boardID in boards
|
for boardID in boards
|
||||||
o = archBoards[boardID] or=
|
o = archBoards[boardID] or=
|
||||||
thread: []
|
thread: [[], []]
|
||||||
post: []
|
post: [[], []]
|
||||||
file: []
|
file: [[], []]
|
||||||
o.thread.push name
|
i = +!!withCredentials
|
||||||
o.post.push name if software is 'foolfuuka'
|
o.thread[i].push name
|
||||||
o.file.push name if boardID in files
|
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 = []
|
rows = []
|
||||||
boardOptions = []
|
boardOptions = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user