Merge branch 'v3' of git://github.com/MayhemYDG/4chan-x into v3
Conflicts: src/General/Header.coffee
This commit is contained in:
commit
cb30242ae8
@ -59,6 +59,7 @@ module.exports = (grunt) ->
|
||||
files:
|
||||
'builds/<%= pkg.name %>.meta.js': 'src/General/meta/metadata.js'
|
||||
'builds/<%= pkg.name %>.user.js': [
|
||||
'src/General/meta/botproc.js'
|
||||
'src/General/meta/metadata.js'
|
||||
'src/General/meta/banner.js'
|
||||
'src/General/meta/usestrict.js'
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.2.25
|
||||
@ -430,13 +431,12 @@
|
||||
fd = new FormData();
|
||||
for (key in form) {
|
||||
val = form[key];
|
||||
if (!val) {
|
||||
continue;
|
||||
}
|
||||
if (val.size && val.name) {
|
||||
fd.append(key, val, val.name);
|
||||
} else {
|
||||
fd.append(key, val);
|
||||
if (val) {
|
||||
if (val.size && val.name) {
|
||||
fd.append(key, val, val.name);
|
||||
} else {
|
||||
fd.append(key, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
return fd;
|
||||
@ -1080,7 +1080,7 @@
|
||||
_ref1 = Get.allQuotelinksLinkingTo(this);
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
quotelink = _ref1[_j];
|
||||
if ($.hasClass(quotelink, 'deadlink')) {
|
||||
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
||||
continue;
|
||||
}
|
||||
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
||||
@ -1844,6 +1844,7 @@
|
||||
date: data.now,
|
||||
dateUTC: data.time,
|
||||
comment: data.com,
|
||||
capReps: data.capcode_replies,
|
||||
isSticky: !!data.sticky,
|
||||
isClosed: !!data.closed
|
||||
};
|
||||
@ -1871,9 +1872,9 @@
|
||||
@license: https://github.com/4chan/4chan-JS/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
var a, boardID, 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, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref;
|
||||
var a, array, boardID, capReps, capcode, capcodeClass, capcodeReplies, capcodeStart, capcodeType, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, generateCapcodeReplies, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref;
|
||||
|
||||
postID = o.postID, threadID = o.threadID, boardID = o.boardID, 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;
|
||||
postID = o.postID, threadID = o.threadID, boardID = o.boardID, 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, capReps = o.capReps, file = o.file;
|
||||
isOP = postID === threadID;
|
||||
staticPath = '//static.4chan.org/image/';
|
||||
if (email) {
|
||||
@ -1947,10 +1948,32 @@
|
||||
tripcode = tripcode ? " <span class=postertrip>" + tripcode + "</span>" : '';
|
||||
sticky = isSticky ? " <img src=" + staticPath + "sticky.gif alt=Sticky title=Sticky class=stickyIcon>" : '';
|
||||
closed = isClosed ? " <img src=" + staticPath + "closed.gif alt=Closed title=Closed class=closedIcon>" : '';
|
||||
capcodeReplies = '';
|
||||
if (capReps) {
|
||||
generateCapcodeReplies = function(capcodeType, array) {
|
||||
return "<span class=smaller><span class=bold>" + ((function() {
|
||||
switch (capcodeType) {
|
||||
case 'admin':
|
||||
return 'Administrator';
|
||||
case 'mod':
|
||||
return 'Moderator';
|
||||
case 'developer':
|
||||
return 'Developer';
|
||||
}
|
||||
})()) + " Repl" + (array.length > 1 ? 'ies' : 'y') + ":</span> " + (array.map(function(ID) {
|
||||
return "<a href='/" + boardID + "/res/" + threadID + "#p" + ID + "' class=quotelink>>>" + ID + "</a>";
|
||||
}).join(' ')) + "</span><br>";
|
||||
};
|
||||
for (capcodeType in capReps) {
|
||||
array = capReps[capcodeType];
|
||||
capcodeReplies += generateCapcodeReplies(capcodeType, array);
|
||||
}
|
||||
capcodeReplies = "<br><br><span class=capcodeReplies>" + capcodeReplies + "</span>";
|
||||
}
|
||||
container = $.el('div', {
|
||||
id: "pc" + postID,
|
||||
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
||||
innerHTML: (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + ("<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcode === 'admin_highlight' ? ' highlightPost' : '') + "'>") + ("<div class='postInfoM mobile' id=pim" + postID + ">") + ("<span class='nameBlock" + capcodeClass + "'>") + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + capcode + userID + flag + sticky + closed + ("<br>" + subject) + ("</span><span class='dateTime postNum' data-utc=" + dateUTC + ">" + date) + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + ">No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? fileHTML : '') + ("<div class='postInfo desktop' id=pi" + postID + ">") + ("<input type=checkbox name=" + postID + " value=delete> ") + ("" + subject + " ") + ("<span class='nameBlock" + capcodeClass + "'>") + emailStart + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + emailEnd + capcode + userID + flag + sticky + closed + ' </span> ' + ("<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span> ") + "<span class='postNum desktop'>" + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? '' : fileHTML) + ("<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + "</blockquote> ") + '</div>'
|
||||
innerHTML: (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + ("<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcode === 'admin_highlight' ? ' highlightPost' : '') + "'>") + ("<div class='postInfoM mobile' id=pim" + postID + ">") + ("<span class='nameBlock" + capcodeClass + "'>") + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + capcode + userID + flag + sticky + closed + ("<br>" + subject) + ("</span><span class='dateTime postNum' data-utc=" + dateUTC + ">" + date) + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + ">No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? fileHTML : '') + ("<div class='postInfo desktop' id=pi" + postID + ">") + ("<input type=checkbox name=" + postID + " value=delete> ") + ("" + subject + " ") + ("<span class='nameBlock" + capcodeClass + "'>") + emailStart + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + emailEnd + capcode + userID + flag + sticky + closed + ' </span> ' + ("<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span> ") + "<span class='postNum desktop'>" + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? '' : fileHTML) + ("<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + capcodeReplies + "</blockquote> ") + '</div>'
|
||||
});
|
||||
_ref = $$('.quotelink', container);
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -4996,12 +5019,11 @@
|
||||
list = $("#list-" + type, QR.nodes.el);
|
||||
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
||||
val = arr[_i];
|
||||
if (!val) {
|
||||
continue;
|
||||
if (val) {
|
||||
$.add(list, $.el('option', {
|
||||
textContent: val
|
||||
}));
|
||||
}
|
||||
$.add(list, $.el('option', {
|
||||
textContent: val
|
||||
}));
|
||||
}
|
||||
},
|
||||
getPassword: function() {
|
||||
@ -9908,14 +9930,13 @@
|
||||
_ref = Config.hotkeys;
|
||||
for (key in _ref) {
|
||||
val = _ref[key];
|
||||
if (!(key in data.Conf)) {
|
||||
continue;
|
||||
if (key in data.Conf) {
|
||||
data.Conf[key] = data.Conf[key].replace(/ctrl|alt|meta/g, function(s) {
|
||||
return "" + (s[0].toUpperCase()) + s.slice(1);
|
||||
}).replace(/(^|.+\+)[A-Z]$/g, function(s) {
|
||||
return "Shift+" + s.slice(0, -1) + (s.slice(-1).toLowerCase());
|
||||
});
|
||||
}
|
||||
data.Conf[key] = data.Conf[key].replace(/ctrl|alt|meta/g, function(s) {
|
||||
return "" + (s[0].toUpperCase()) + s.slice(1);
|
||||
}).replace(/(^|.+\+)[A-Z]$/g, function(s) {
|
||||
return "Shift+" + s.slice(0, -1) + (s.slice(-1).toLowerCase());
|
||||
});
|
||||
}
|
||||
data.Conf.WatchedThreads = data.WatchedThreads;
|
||||
} else if (version[0] === '3') {
|
||||
|
||||
@ -411,13 +411,12 @@
|
||||
fd = new FormData();
|
||||
for (key in form) {
|
||||
val = form[key];
|
||||
if (!val) {
|
||||
continue;
|
||||
}
|
||||
if (val.size && val.name) {
|
||||
fd.append(key, val, val.name);
|
||||
} else {
|
||||
fd.append(key, val);
|
||||
if (val) {
|
||||
if (val.size && val.name) {
|
||||
fd.append(key, val, val.name);
|
||||
} else {
|
||||
fd.append(key, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
return fd;
|
||||
@ -1092,7 +1091,7 @@
|
||||
_ref1 = Get.allQuotelinksLinkingTo(this);
|
||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||
quotelink = _ref1[_j];
|
||||
if ($.hasClass(quotelink, 'deadlink')) {
|
||||
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
||||
continue;
|
||||
}
|
||||
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
||||
@ -1856,6 +1855,7 @@
|
||||
date: data.now,
|
||||
dateUTC: data.time,
|
||||
comment: data.com,
|
||||
capReps: data.capcode_replies,
|
||||
isSticky: !!data.sticky,
|
||||
isClosed: !!data.closed
|
||||
};
|
||||
@ -1883,9 +1883,9 @@
|
||||
@license: https://github.com/4chan/4chan-JS/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
var a, boardID, 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, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref;
|
||||
var a, array, boardID, capReps, capcode, capcodeClass, capcodeReplies, capcodeStart, capcodeType, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, generateCapcodeReplies, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref;
|
||||
|
||||
postID = o.postID, threadID = o.threadID, boardID = o.boardID, 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;
|
||||
postID = o.postID, threadID = o.threadID, boardID = o.boardID, 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, capReps = o.capReps, file = o.file;
|
||||
isOP = postID === threadID;
|
||||
staticPath = '//static.4chan.org/image/';
|
||||
if (email) {
|
||||
@ -1959,10 +1959,32 @@
|
||||
tripcode = tripcode ? " <span class=postertrip>" + tripcode + "</span>" : '';
|
||||
sticky = isSticky ? " <img src=" + staticPath + "sticky.gif alt=Sticky title=Sticky class=stickyIcon>" : '';
|
||||
closed = isClosed ? " <img src=" + staticPath + "closed.gif alt=Closed title=Closed class=closedIcon>" : '';
|
||||
capcodeReplies = '';
|
||||
if (capReps) {
|
||||
generateCapcodeReplies = function(capcodeType, array) {
|
||||
return "<span class=smaller><span class=bold>" + ((function() {
|
||||
switch (capcodeType) {
|
||||
case 'admin':
|
||||
return 'Administrator';
|
||||
case 'mod':
|
||||
return 'Moderator';
|
||||
case 'developer':
|
||||
return 'Developer';
|
||||
}
|
||||
})()) + " Repl" + (array.length > 1 ? 'ies' : 'y') + ":</span> " + (array.map(function(ID) {
|
||||
return "<a href='/" + boardID + "/res/" + threadID + "#p" + ID + "' class=quotelink>>>" + ID + "</a>";
|
||||
}).join(' ')) + "</span><br>";
|
||||
};
|
||||
for (capcodeType in capReps) {
|
||||
array = capReps[capcodeType];
|
||||
capcodeReplies += generateCapcodeReplies(capcodeType, array);
|
||||
}
|
||||
capcodeReplies = "<br><br><span class=capcodeReplies>" + capcodeReplies + "</span>";
|
||||
}
|
||||
container = $.el('div', {
|
||||
id: "pc" + postID,
|
||||
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
||||
innerHTML: (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + ("<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcode === 'admin_highlight' ? ' highlightPost' : '') + "'>") + ("<div class='postInfoM mobile' id=pim" + postID + ">") + ("<span class='nameBlock" + capcodeClass + "'>") + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + capcode + userID + flag + sticky + closed + ("<br>" + subject) + ("</span><span class='dateTime postNum' data-utc=" + dateUTC + ">" + date) + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + ">No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? fileHTML : '') + ("<div class='postInfo desktop' id=pi" + postID + ">") + ("<input type=checkbox name=" + postID + " value=delete> ") + ("" + subject + " ") + ("<span class='nameBlock" + capcodeClass + "'>") + emailStart + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + emailEnd + capcode + userID + flag + sticky + closed + ' </span> ' + ("<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span> ") + "<span class='postNum desktop'>" + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? '' : fileHTML) + ("<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + "</blockquote> ") + '</div>'
|
||||
innerHTML: (isOP ? '' : "<div class=sideArrows id=sa" + postID + ">>></div>") + ("<div id=p" + postID + " class='post " + (isOP ? 'op' : 'reply') + (capcode === 'admin_highlight' ? ' highlightPost' : '') + "'>") + ("<div class='postInfoM mobile' id=pim" + postID + ">") + ("<span class='nameBlock" + capcodeClass + "'>") + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + capcode + userID + flag + sticky + closed + ("<br>" + subject) + ("</span><span class='dateTime postNum' data-utc=" + dateUTC + ">" + date) + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + ">No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? fileHTML : '') + ("<div class='postInfo desktop' id=pi" + postID + ">") + ("<input type=checkbox name=" + postID + " value=delete> ") + ("" + subject + " ") + ("<span class='nameBlock" + capcodeClass + "'>") + emailStart + ("<span class=name>" + (name || '') + "</span>") + tripcode + capcodeStart + emailEnd + capcode + userID + flag + sticky + closed + ' </span> ' + ("<span class=dateTime data-utc=" + dateUTC + ">" + date + "</span> ") + "<span class='postNum desktop'>" + ("<a href=" + ("/" + boardID + "/res/" + threadID + "#p" + postID) + " title='Highlight this post'>No.</a>") + ("<a href='" + (g.VIEW === 'thread' && g.THREADID === +threadID ? "javascript:quote(" + postID + ")" : "/" + boardID + "/res/" + threadID + "#q" + postID) + "' title='Quote this post'>" + postID + "</a>") + '</span>' + '</div>' + (isOP ? '' : fileHTML) + ("<blockquote class=postMessage id=m" + postID + ">" + (comment || '') + capcodeReplies + "</blockquote> ") + '</div>'
|
||||
});
|
||||
_ref = $$('.quotelink', container);
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
@ -5002,12 +5024,11 @@
|
||||
list = $("#list-" + type, QR.nodes.el);
|
||||
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
||||
val = arr[_i];
|
||||
if (!val) {
|
||||
continue;
|
||||
if (val) {
|
||||
$.add(list, $.el('option', {
|
||||
textContent: val
|
||||
}));
|
||||
}
|
||||
$.add(list, $.el('option', {
|
||||
textContent: val
|
||||
}));
|
||||
}
|
||||
},
|
||||
getPassword: function() {
|
||||
@ -9892,14 +9913,13 @@
|
||||
_ref = Config.hotkeys;
|
||||
for (key in _ref) {
|
||||
val = _ref[key];
|
||||
if (!(key in data.Conf)) {
|
||||
continue;
|
||||
if (key in data.Conf) {
|
||||
data.Conf[key] = data.Conf[key].replace(/ctrl|alt|meta/g, function(s) {
|
||||
return "" + (s[0].toUpperCase()) + s.slice(1);
|
||||
}).replace(/(^|.+\+)[A-Z]$/g, function(s) {
|
||||
return "Shift+" + s.slice(0, -1) + (s.slice(-1).toLowerCase());
|
||||
});
|
||||
}
|
||||
data.Conf[key] = data.Conf[key].replace(/ctrl|alt|meta/g, function(s) {
|
||||
return "" + (s[0].toUpperCase()) + s.slice(1);
|
||||
}).replace(/(^|.+\+)[A-Z]$/g, function(s) {
|
||||
return "Shift+" + s.slice(0, -1) + (s.slice(-1).toLowerCase());
|
||||
});
|
||||
}
|
||||
data.Conf.WatchedThreads = data.WatchedThreads;
|
||||
} else if (version[0] === '3') {
|
||||
|
||||
@ -27,6 +27,7 @@ Build =
|
||||
date: data.now
|
||||
dateUTC: data.time
|
||||
comment: data.com
|
||||
capReps: data.capcode_replies
|
||||
# thread status
|
||||
isSticky: !!data.sticky
|
||||
isClosed: !!data.closed
|
||||
@ -58,7 +59,7 @@ Build =
|
||||
postID, threadID, boardID
|
||||
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
||||
isSticky, isClosed
|
||||
comment
|
||||
comment, capReps
|
||||
file
|
||||
} = o
|
||||
isOP = postID is threadID
|
||||
@ -176,22 +177,39 @@ Build =
|
||||
else
|
||||
fileHTML = ''
|
||||
|
||||
tripcode =
|
||||
if tripcode
|
||||
" <span class=postertrip>#{tripcode}</span>"
|
||||
else
|
||||
''
|
||||
tripcode = if tripcode
|
||||
" <span class=postertrip>#{tripcode}</span>"
|
||||
else
|
||||
''
|
||||
|
||||
sticky =
|
||||
if isSticky
|
||||
" <img src=#{staticPath}sticky.gif alt=Sticky title=Sticky class=stickyIcon>"
|
||||
else
|
||||
''
|
||||
closed =
|
||||
if isClosed
|
||||
" <img src=#{staticPath}closed.gif alt=Closed title=Closed class=closedIcon>"
|
||||
else
|
||||
''
|
||||
sticky = if isSticky
|
||||
" <img src=#{staticPath}sticky.gif alt=Sticky title=Sticky class=stickyIcon>"
|
||||
else
|
||||
''
|
||||
closed = if isClosed
|
||||
" <img src=#{staticPath}closed.gif alt=Closed title=Closed class=closedIcon>"
|
||||
else
|
||||
''
|
||||
|
||||
capcodeReplies = ''
|
||||
if capReps
|
||||
generateCapcodeReplies = (capcodeType, array) ->
|
||||
"<span class=smaller><span class=bold>#{
|
||||
switch capcodeType
|
||||
when 'admin'
|
||||
'Administrator'
|
||||
when 'mod'
|
||||
'Moderator'
|
||||
when 'developer'
|
||||
'Developer'
|
||||
} Repl#{if array.length > 1 then 'ies' else 'y'}:</span> #{
|
||||
array.map (ID) ->
|
||||
"<a href='/#{boardID}/res/#{threadID}#p#{ID}' class=quotelink>>>#{ID}</a>"
|
||||
.join ' '
|
||||
}</span><br>"
|
||||
for capcodeType, array of capReps
|
||||
capcodeReplies += generateCapcodeReplies capcodeType, array
|
||||
capcodeReplies = "<br><br><span class=capcodeReplies>#{capcodeReplies}</span>"
|
||||
|
||||
container = $.el 'div',
|
||||
id: "pc#{postID}"
|
||||
@ -245,7 +263,7 @@ Build =
|
||||
|
||||
(if isOP then '' else fileHTML) +
|
||||
|
||||
"<blockquote class=postMessage id=m#{postID}>#{comment or ''}</blockquote> " +
|
||||
"<blockquote class=postMessage id=m#{postID}>#{comment or ''}#{capcodeReplies}</blockquote> " +
|
||||
|
||||
'</div>'
|
||||
|
||||
|
||||
@ -262,8 +262,7 @@ Settings =
|
||||
'%board'
|
||||
else
|
||||
c
|
||||
for key, val of Config.hotkeys
|
||||
continue unless key of data.Conf
|
||||
for key, val of Config.hotkeys when key of data.Conf
|
||||
data.Conf[key] = data.Conf[key].replace(/ctrl|alt|meta/g, (s) -> "#{s[0].toUpperCase()}#{s[1..]}").replace /(^|.+\+)[A-Z]$/g, (s) ->
|
||||
"Shift+#{s[0...-1]}#{s[-1..].toLowerCase()}"
|
||||
data.Conf.WatchedThreads = data.WatchedThreads
|
||||
|
||||
@ -61,8 +61,7 @@ $.formData = (form) ->
|
||||
if form instanceof HTMLFormElement
|
||||
return new FormData form
|
||||
fd = new FormData()
|
||||
for key, val of form
|
||||
continue unless val
|
||||
for key, val of form when val
|
||||
# XXX GM bug
|
||||
# if val instanceof Blob
|
||||
if val.size and val.name
|
||||
|
||||
@ -174,8 +174,7 @@ class Post
|
||||
return if file
|
||||
# Get quotelinks/backlinks to this post
|
||||
# and paint them (Dead).
|
||||
for quotelink in Get.allQuotelinksLinkingTo @
|
||||
continue if $.hasClass quotelink, 'deadlink'
|
||||
for quotelink in Get.allQuotelinksLinkingTo @ when not $.hasClass quotelink, 'deadlink'
|
||||
$.add quotelink, $.tn '\u00A0(Dead)'
|
||||
$.addClass quotelink, 'deadlink'
|
||||
return
|
||||
|
||||
@ -213,9 +213,7 @@ QR =
|
||||
|
||||
loadPersonas: (type, arr) ->
|
||||
list = $ "#list-#{type}", QR.nodes.el
|
||||
for val in arr
|
||||
# XXX Firefox displays empty <option>s in the completion list.
|
||||
continue unless val
|
||||
for val in arr when val
|
||||
$.add list, $.el 'option',
|
||||
textContent: val
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user