From c7bfdecb2e47643207961b3a181069eea48ed816 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Fri, 7 Sep 2012 20:33:12 +0200 Subject: [PATCH] Add admin_highlight hl class. --- 4chan_x.user.js | 8 ++++++-- script.coffee | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index c1fb119eb..fe33c44e4 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3715,7 +3715,7 @@ @license: https://github.com/4chan/4chan-JS/blob/master/LICENSE */ - var board, capcode, capcodeClass, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, flag, flagCode, flagName, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; + var board, capcode, capcodeClass, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, flag, flagCode, flagName, highlight, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; postID = o.postID, threadID = o.threadID, board = o.board, name = o.name, capcode = o.capcode, tripcode = o.tripcode, uniqueID = o.uniqueID, email = o.email, subject = o.subject, flagCode = o.flagCode, flagName = o.flagName, date = o.date, dateUTC = o.dateUTC, isSticky = o.isSticky, isClosed = o.isClosed, comment = o.comment, file = o.file; isOP = postID === threadID; staticPath = '//static.4chan.org'; @@ -3730,6 +3730,9 @@ switch (capcode) { case 'admin': case 'admin_highlight': + if (capcode === 'admin_highlight') { + highlight = ' highlightPost'; + } capcodeClass = " capcodeAdmin"; capcodeStart = " ## Admin"; capcode = (" "; @@ -3745,6 +3748,7 @@ capcode = (" "; break; default: + highlight = ''; capcodeClass = ''; capcodeStart = ''; capcode = ''; @@ -3808,7 +3812,7 @@ container = $.el('div', { id: "pc" + postID, className: "postContainer " + (isOP ? 'op' : 'reply') + "Container", - innerHTML: (isOP ? '' : "
>>
") + ("
") + ("' + (isOP ? fileHTML : '') + ("' + (isOP ? '' : fileHTML) + ("
" + comment + "
") + '
' + innerHTML: (isOP ? '' : "
>>
") + ("
") + ("' + (isOP ? fileHTML : '') + ("' + (isOP ? '' : fileHTML) + ("
" + comment + "
") + '
' }); _ref = $$('.quotelink', container); for (_i = 0, _len = _ref.length; _i < _len; _i++) { diff --git a/script.coffee b/script.coffee index 43b986ebf..c40851dd7 100644 --- a/script.coffee +++ b/script.coffee @@ -2962,6 +2962,7 @@ Build = switch capcode when 'admin', 'admin_highlight' + highlight = ' highlightPost' if capcode is 'admin_highlight' capcodeClass = " capcodeAdmin" capcodeStart = " ## Admin" @@ -2983,6 +2984,7 @@ Build = "alt='This user is a 4chan Developer.' " + "title='This user is a 4chan Developer.' class=identityIcon>" else + highlight = '' capcodeClass = '' capcodeStart = '' capcode = '' @@ -3072,7 +3074,7 @@ Build = className: "postContainer #{if isOP then 'op' else 'reply'}Container" innerHTML: \ (if isOP then '' else "
>>
") + - "
" + + "
" + "