Make name/subject treatment more consistent.
This commit is contained in:
parent
4fcc2d02f3
commit
b1201aa515
@ -125,7 +125,7 @@ Filter =
|
||||
uniqueID: (post) -> post.info.uniqueID
|
||||
tripcode: (post) -> post.info.tripcode
|
||||
capcode: (post) -> post.info.capcode
|
||||
subject: (post) -> post.info.subject or undefined
|
||||
subject: (post) -> post.info.subject
|
||||
comment: (post) -> post.info.comment
|
||||
flag: (post) -> post.info.flag
|
||||
filename: (post) -> post.file?.name
|
||||
|
||||
@ -33,7 +33,7 @@ Build =
|
||||
threadID: data.resto or data.no
|
||||
boardID: boardID
|
||||
# info
|
||||
name: Build.unescape data.name
|
||||
name: Build.unescape(data.name) or ''
|
||||
tripcode: data.trip
|
||||
uniqueID: data.id
|
||||
email: Build.unescape data.email
|
||||
@ -81,8 +81,6 @@ Build =
|
||||
comment
|
||||
file, fileDeleted
|
||||
} = o
|
||||
name or= ''
|
||||
subject or= ''
|
||||
isOP = postID is threadID
|
||||
{staticPath, gifIcon} = Build
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<div class="postInfo desktop" id="pi${postID}">
|
||||
<input type="checkbox" name="${postID}" value="delete">
|
||||
?{isOP || boardID === "f"}{<span class="subject">${subject}</span> }
|
||||
?{isOP || boardID === "f"}{<span class="subject">${subject || ""}</span> }
|
||||
<span class="nameBlock?{capcode}{ capcode${capcodeUC}}">
|
||||
?{email}{<a href="mailto:${encodeURIComponent(email).replace(/%40/g, "@")}" class="useremail">}
|
||||
<span class="name?{capcode}{ capcode}">${name}</span>
|
||||
|
||||
@ -131,14 +131,14 @@ class Fetcher
|
||||
threadID: @threadID
|
||||
boardID: @boardID
|
||||
# info
|
||||
name: data.name
|
||||
name: data.name or ''
|
||||
capcode: switch data.capcode
|
||||
when 'M' then 'Mod'
|
||||
when 'A' then 'Admin'
|
||||
when 'D' then 'Developer'
|
||||
tripcode: data.trip
|
||||
uniqueID: data.poster_hash
|
||||
email: data.email or ''
|
||||
email: data.email
|
||||
subject: data.title
|
||||
flagCode: data.poster_country
|
||||
flagName: data.poster_country_name
|
||||
|
||||
@ -56,7 +56,7 @@ class Post
|
||||
@nodes.nameBlock.textContent.trim()
|
||||
if subject = $ '.subject', info
|
||||
@nodes.subject = subject
|
||||
@info.subject = subject.textContent
|
||||
@info.subject = subject.textContent or undefined
|
||||
if name = $ '.name', info
|
||||
@nodes.name = name
|
||||
@info.name = name.textContent
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user