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