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:
|
files:
|
||||||
'builds/<%= pkg.name %>.meta.js': 'src/General/meta/metadata.js'
|
'builds/<%= pkg.name %>.meta.js': 'src/General/meta/metadata.js'
|
||||||
'builds/<%= pkg.name %>.user.js': [
|
'builds/<%= pkg.name %>.user.js': [
|
||||||
|
'src/General/meta/botproc.js'
|
||||||
'src/General/meta/metadata.js'
|
'src/General/meta/metadata.js'
|
||||||
'src/General/meta/banner.js'
|
'src/General/meta/banner.js'
|
||||||
'src/General/meta/usestrict.js'
|
'src/General/meta/usestrict.js'
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.2.25
|
// @version 1.2.25
|
||||||
@ -430,13 +431,12 @@
|
|||||||
fd = new FormData();
|
fd = new FormData();
|
||||||
for (key in form) {
|
for (key in form) {
|
||||||
val = form[key];
|
val = form[key];
|
||||||
if (!val) {
|
if (val) {
|
||||||
continue;
|
if (val.size && val.name) {
|
||||||
}
|
fd.append(key, val, val.name);
|
||||||
if (val.size && val.name) {
|
} else {
|
||||||
fd.append(key, val, val.name);
|
fd.append(key, val);
|
||||||
} else {
|
}
|
||||||
fd.append(key, val);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
@ -1080,7 +1080,7 @@
|
|||||||
_ref1 = Get.allQuotelinksLinkingTo(this);
|
_ref1 = Get.allQuotelinksLinkingTo(this);
|
||||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||||
quotelink = _ref1[_j];
|
quotelink = _ref1[_j];
|
||||||
if ($.hasClass(quotelink, 'deadlink')) {
|
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
||||||
@ -1844,6 +1844,7 @@
|
|||||||
date: data.now,
|
date: data.now,
|
||||||
dateUTC: data.time,
|
dateUTC: data.time,
|
||||||
comment: data.com,
|
comment: data.com,
|
||||||
|
capReps: data.capcode_replies,
|
||||||
isSticky: !!data.sticky,
|
isSticky: !!data.sticky,
|
||||||
isClosed: !!data.closed
|
isClosed: !!data.closed
|
||||||
};
|
};
|
||||||
@ -1871,9 +1872,9 @@
|
|||||||
@license: https://github.com/4chan/4chan-JS/blob/master/LICENSE
|
@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;
|
isOP = postID === threadID;
|
||||||
staticPath = '//static.4chan.org/image/';
|
staticPath = '//static.4chan.org/image/';
|
||||||
if (email) {
|
if (email) {
|
||||||
@ -1947,10 +1948,32 @@
|
|||||||
tripcode = tripcode ? " <span class=postertrip>" + tripcode + "</span>" : '';
|
tripcode = tripcode ? " <span class=postertrip>" + tripcode + "</span>" : '';
|
||||||
sticky = isSticky ? " <img src=" + staticPath + "sticky.gif alt=Sticky title=Sticky class=stickyIcon>" : '';
|
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>" : '';
|
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', {
|
container = $.el('div', {
|
||||||
id: "pc" + postID,
|
id: "pc" + postID,
|
||||||
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
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);
|
_ref = $$('.quotelink', container);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
@ -4996,12 +5019,11 @@
|
|||||||
list = $("#list-" + type, QR.nodes.el);
|
list = $("#list-" + type, QR.nodes.el);
|
||||||
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
||||||
val = arr[_i];
|
val = arr[_i];
|
||||||
if (!val) {
|
if (val) {
|
||||||
continue;
|
$.add(list, $.el('option', {
|
||||||
|
textContent: val
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
$.add(list, $.el('option', {
|
|
||||||
textContent: val
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getPassword: function() {
|
getPassword: function() {
|
||||||
@ -9908,14 +9930,13 @@
|
|||||||
_ref = Config.hotkeys;
|
_ref = Config.hotkeys;
|
||||||
for (key in _ref) {
|
for (key in _ref) {
|
||||||
val = _ref[key];
|
val = _ref[key];
|
||||||
if (!(key in data.Conf)) {
|
if (key in data.Conf) {
|
||||||
continue;
|
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;
|
data.Conf.WatchedThreads = data.WatchedThreads;
|
||||||
} else if (version[0] === '3') {
|
} else if (version[0] === '3') {
|
||||||
|
|||||||
@ -411,13 +411,12 @@
|
|||||||
fd = new FormData();
|
fd = new FormData();
|
||||||
for (key in form) {
|
for (key in form) {
|
||||||
val = form[key];
|
val = form[key];
|
||||||
if (!val) {
|
if (val) {
|
||||||
continue;
|
if (val.size && val.name) {
|
||||||
}
|
fd.append(key, val, val.name);
|
||||||
if (val.size && val.name) {
|
} else {
|
||||||
fd.append(key, val, val.name);
|
fd.append(key, val);
|
||||||
} else {
|
}
|
||||||
fd.append(key, val);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
@ -1092,7 +1091,7 @@
|
|||||||
_ref1 = Get.allQuotelinksLinkingTo(this);
|
_ref1 = Get.allQuotelinksLinkingTo(this);
|
||||||
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
||||||
quotelink = _ref1[_j];
|
quotelink = _ref1[_j];
|
||||||
if ($.hasClass(quotelink, 'deadlink')) {
|
if (!(!$.hasClass(quotelink, 'deadlink'))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
$.add(quotelink, $.tn('\u00A0(Dead)'));
|
||||||
@ -1856,6 +1855,7 @@
|
|||||||
date: data.now,
|
date: data.now,
|
||||||
dateUTC: data.time,
|
dateUTC: data.time,
|
||||||
comment: data.com,
|
comment: data.com,
|
||||||
|
capReps: data.capcode_replies,
|
||||||
isSticky: !!data.sticky,
|
isSticky: !!data.sticky,
|
||||||
isClosed: !!data.closed
|
isClosed: !!data.closed
|
||||||
};
|
};
|
||||||
@ -1883,9 +1883,9 @@
|
|||||||
@license: https://github.com/4chan/4chan-JS/blob/master/LICENSE
|
@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;
|
isOP = postID === threadID;
|
||||||
staticPath = '//static.4chan.org/image/';
|
staticPath = '//static.4chan.org/image/';
|
||||||
if (email) {
|
if (email) {
|
||||||
@ -1959,10 +1959,32 @@
|
|||||||
tripcode = tripcode ? " <span class=postertrip>" + tripcode + "</span>" : '';
|
tripcode = tripcode ? " <span class=postertrip>" + tripcode + "</span>" : '';
|
||||||
sticky = isSticky ? " <img src=" + staticPath + "sticky.gif alt=Sticky title=Sticky class=stickyIcon>" : '';
|
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>" : '';
|
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', {
|
container = $.el('div', {
|
||||||
id: "pc" + postID,
|
id: "pc" + postID,
|
||||||
className: "postContainer " + (isOP ? 'op' : 'reply') + "Container",
|
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);
|
_ref = $$('.quotelink', container);
|
||||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
@ -5002,12 +5024,11 @@
|
|||||||
list = $("#list-" + type, QR.nodes.el);
|
list = $("#list-" + type, QR.nodes.el);
|
||||||
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
for (_i = 0, _len = arr.length; _i < _len; _i++) {
|
||||||
val = arr[_i];
|
val = arr[_i];
|
||||||
if (!val) {
|
if (val) {
|
||||||
continue;
|
$.add(list, $.el('option', {
|
||||||
|
textContent: val
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
$.add(list, $.el('option', {
|
|
||||||
textContent: val
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getPassword: function() {
|
getPassword: function() {
|
||||||
@ -9892,14 +9913,13 @@
|
|||||||
_ref = Config.hotkeys;
|
_ref = Config.hotkeys;
|
||||||
for (key in _ref) {
|
for (key in _ref) {
|
||||||
val = _ref[key];
|
val = _ref[key];
|
||||||
if (!(key in data.Conf)) {
|
if (key in data.Conf) {
|
||||||
continue;
|
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;
|
data.Conf.WatchedThreads = data.WatchedThreads;
|
||||||
} else if (version[0] === '3') {
|
} else if (version[0] === '3') {
|
||||||
|
|||||||
@ -27,6 +27,7 @@ Build =
|
|||||||
date: data.now
|
date: data.now
|
||||||
dateUTC: data.time
|
dateUTC: data.time
|
||||||
comment: data.com
|
comment: data.com
|
||||||
|
capReps: data.capcode_replies
|
||||||
# thread status
|
# thread status
|
||||||
isSticky: !!data.sticky
|
isSticky: !!data.sticky
|
||||||
isClosed: !!data.closed
|
isClosed: !!data.closed
|
||||||
@ -58,7 +59,7 @@ Build =
|
|||||||
postID, threadID, boardID
|
postID, threadID, boardID
|
||||||
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
||||||
isSticky, isClosed
|
isSticky, isClosed
|
||||||
comment
|
comment, capReps
|
||||||
file
|
file
|
||||||
} = o
|
} = o
|
||||||
isOP = postID is threadID
|
isOP = postID is threadID
|
||||||
@ -176,22 +177,39 @@ Build =
|
|||||||
else
|
else
|
||||||
fileHTML = ''
|
fileHTML = ''
|
||||||
|
|
||||||
tripcode =
|
tripcode = if tripcode
|
||||||
if tripcode
|
" <span class=postertrip>#{tripcode}</span>"
|
||||||
" <span class=postertrip>#{tripcode}</span>"
|
else
|
||||||
else
|
''
|
||||||
''
|
|
||||||
|
|
||||||
sticky =
|
sticky = if isSticky
|
||||||
if isSticky
|
" <img src=#{staticPath}sticky.gif alt=Sticky title=Sticky class=stickyIcon>"
|
||||||
" <img src=#{staticPath}sticky.gif alt=Sticky title=Sticky class=stickyIcon>"
|
else
|
||||||
else
|
''
|
||||||
''
|
closed = if isClosed
|
||||||
closed =
|
" <img src=#{staticPath}closed.gif alt=Closed title=Closed class=closedIcon>"
|
||||||
if isClosed
|
else
|
||||||
" <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',
|
container = $.el 'div',
|
||||||
id: "pc#{postID}"
|
id: "pc#{postID}"
|
||||||
@ -245,7 +263,7 @@ Build =
|
|||||||
|
|
||||||
(if isOP then '' else fileHTML) +
|
(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>'
|
'</div>'
|
||||||
|
|
||||||
|
|||||||
@ -262,8 +262,7 @@ Settings =
|
|||||||
'%board'
|
'%board'
|
||||||
else
|
else
|
||||||
c
|
c
|
||||||
for key, val of Config.hotkeys
|
for key, val of Config.hotkeys when key of data.Conf
|
||||||
continue unless 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) ->
|
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()}"
|
"Shift+#{s[0...-1]}#{s[-1..].toLowerCase()}"
|
||||||
data.Conf.WatchedThreads = data.WatchedThreads
|
data.Conf.WatchedThreads = data.WatchedThreads
|
||||||
|
|||||||
@ -61,8 +61,7 @@ $.formData = (form) ->
|
|||||||
if form instanceof HTMLFormElement
|
if form instanceof HTMLFormElement
|
||||||
return new FormData form
|
return new FormData form
|
||||||
fd = new FormData()
|
fd = new FormData()
|
||||||
for key, val of form
|
for key, val of form when val
|
||||||
continue unless val
|
|
||||||
# XXX GM bug
|
# XXX GM bug
|
||||||
# if val instanceof Blob
|
# if val instanceof Blob
|
||||||
if val.size and val.name
|
if val.size and val.name
|
||||||
|
|||||||
@ -174,8 +174,7 @@ class Post
|
|||||||
return if file
|
return if file
|
||||||
# Get quotelinks/backlinks to this post
|
# Get quotelinks/backlinks to this post
|
||||||
# and paint them (Dead).
|
# and paint them (Dead).
|
||||||
for quotelink in Get.allQuotelinksLinkingTo @
|
for quotelink in Get.allQuotelinksLinkingTo @ when not $.hasClass quotelink, 'deadlink'
|
||||||
continue if $.hasClass quotelink, 'deadlink'
|
|
||||||
$.add quotelink, $.tn '\u00A0(Dead)'
|
$.add quotelink, $.tn '\u00A0(Dead)'
|
||||||
$.addClass quotelink, 'deadlink'
|
$.addClass quotelink, 'deadlink'
|
||||||
return
|
return
|
||||||
|
|||||||
@ -213,9 +213,7 @@ QR =
|
|||||||
|
|
||||||
loadPersonas: (type, arr) ->
|
loadPersonas: (type, arr) ->
|
||||||
list = $ "#list-#{type}", QR.nodes.el
|
list = $ "#list-#{type}", QR.nodes.el
|
||||||
for val in arr
|
for val in arr when val
|
||||||
# XXX Firefox displays empty <option>s in the completion list.
|
|
||||||
continue unless val
|
|
||||||
$.add list, $.el 'option',
|
$.add list, $.el 'option',
|
||||||
textContent: val
|
textContent: val
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user