From 4ee145672c9ca6cf9b0b845551bb7a5c5bea07cc Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 8 Sep 2012 00:36:34 +0200 Subject: [PATCH] Fix 'undefined' highlight class for admin capcode. --- 4chan_x.user.js | 8 ++------ script.coffee | 9 ++++++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index cdff1c306..89dfbe5b5 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3729,7 +3729,7 @@ @license: https://github.com/4chan/4chan-JS/blob/master/LICENSE */ - var a, board, capcode, capcodeClass, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, highlight, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; + var a, board, capcode, capcodeClass, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, 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'; @@ -3744,9 +3744,6 @@ switch (capcode) { case 'admin': case 'admin_highlight': - if (capcode === 'admin_highlight') { - highlight = ' highlightPost'; - } capcodeClass = " capcodeAdmin"; capcodeStart = " ## Admin"; capcode = (" "; @@ -3762,7 +3759,6 @@ capcode = (" "; break; default: - highlight = ''; capcodeClass = ''; capcodeStart = ''; capcode = ''; @@ -3834,7 +3830,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 93289e06a..162bbc92b 100644 --- a/script.coffee +++ b/script.coffee @@ -2965,7 +2965,6 @@ Build = switch capcode when 'admin', 'admin_highlight' - highlight = ' highlightPost' if capcode is 'admin_highlight' capcodeClass = " capcodeAdmin" capcodeStart = " ## Admin" @@ -2987,7 +2986,6 @@ Build = "alt='This user is a 4chan Developer.' " + "title='This user is a 4chan Developer.' class=identityIcon>" else - highlight = '' capcodeClass = '' capcodeStart = '' capcode = '' @@ -3090,7 +3088,12 @@ Build = className: "postContainer #{if isOP then 'op' else 'reply'}Container" innerHTML: \ (if isOP then '' else "
>>
") + - "
" + + "
" + "