Small fixes

This commit is contained in:
Zixaphir 2015-01-10 00:31:38 -07:00
parent 409f1f9ecf
commit ada2b5abd0
10 changed files with 140 additions and 97 deletions

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.9.43 - 2015-01-09
* appchan x - Version 2.9.43 - 2015-01-10
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -27,7 +27,7 @@
// ==/UserScript==
/*
* appchan x - Version 2.9.43 - 2015-01-09
* appchan x - Version 2.9.43 - 2015-01-10
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -2707,7 +2707,6 @@
req.callbacks.push(cb);
}
return req;
return;
}
rm = function() {
return delete reqs[url];
@ -3180,8 +3179,8 @@
function Board(ID) {
this.ID = ID;
this.threads = new SimpleDict;
this.posts = new SimpleDict;
this.threads = new SimpleDict();
this.posts = new SimpleDict();
g.boards[this] = this;
}
@ -3200,7 +3199,7 @@
this.ID = ID;
this.board = board;
this.fullID = "" + this.board + "." + this.ID;
this.posts = new SimpleDict;
this.posts = new SimpleDict();
this.isDead = false;
this.isHidden = false;
this.isOnTop = false;
@ -5945,7 +5944,7 @@
shortFilename: function(filename) {
var ext, threshold;
threshold = 30;
ext = filename.match(/\.[^.]+$/)[0];
ext = filename.match(/\.?[^\.]*$/)[0];
if (filename.length - ext.length > threshold) {
return "" + filename.slice(0, threshold - 5) + "(...)" + ext;
} else {
@ -6010,7 +6009,6 @@
} else if (data.ext) {
o.file = {
name: (Build.unescape(data.filename)) + data.ext,
name: data.filename + data.ext,
timestamp: "" + data.tim + data.ext,
url: boardID === 'f' ? "//i.4cdn.org/" + boardID + "/" + (encodeURIComponent(data.filename)) + data.ext : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
height: data.h,
@ -6049,7 +6047,7 @@
innerHTML: " <strong class=\"capcode hand id_admin\" title=\"Highlight posts by the Administrator\">## Admin</strong>"
};
capcodeIcon = {
innerHTML: " <img src=\"" + E(staticPath) + "adminicon" + E(gifIcon) + "\" alt=\"Admin Icon\" title=\"This user is the 4chan Administrator.\" class=\"identityIcon retina\">"
innerHTML: " <img src=\"//s.4cdn.org/image/adminicon" + E(retina) + ".gif\" alt=\"Admin Icon\" title=\"This user is the 4chan Administrator.\" class=\"identityIcon retina\">"
};
break;
case 'mod':
@ -6058,14 +6056,16 @@
innerHTML: " <strong class=\"capcode hand id_mod\" title=\"Highlight posts by Moderators\">## Mod</strong>"
};
capcodeIcon = {
innerHTML: " <img src=\"" + E(staticPath) + "modicon" + E(gifIcon) + "\" alt=\"Mod Icon\" title=\"This user is a 4chan Moderator.\" class=\"identityIcon retina\">"
innerHTML: " <img src=\"//s.4cdn.org/image/modicon" + E(retina) + ".gif\" alt=\"Mod Icon\" title=\"This user is a 4chan Moderator.\" class=\"identityIcon retina\">"
};
break;
case 'developer':
capcodeClass = ' capcodeDeveloper';
capcodeStart = {
innerHTML: " <strong class=\"capcode hand id_developer\" title=\"Highlight posts by Developers\">## Developer</strong>"
};
capcodeIcon = {
innerHTML: " <img src=\"" + E(staticPath) + "developericon" + E(gifIcon) + "\" alt=\"Developer Icon\" title=\"This user is a 4chan Developer.\" class=\"identityIcon retina\">"
innerHTML: " <img src=\"//s.4cdn.org/image/developericon" + E(retina) + ".gif\" alt=\"Developer Icon\" title=\"This user is a 4chan Developer.\" class=\"identityIcon retina\">"
};
break;
default:
@ -6147,21 +6147,43 @@
};
/* File Info */
fileCont = (file != null ? file.isDeleted : void 0) ? {
innerHTML: "<span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span>"
} : file && boardID === 'f' ? {
innerHTML: "<div class=\"fileInfo\"><span class=\"fileText\" id=\"fT" + E(postID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E($.bytesToString(file.size)) + ", " + E(file.width) + "x" + E(file.height) + ", " + E(file.tag) + ")</span></div>"
} : file ? (file.isSpoiler ? (shortFilename = 'Spoiler Image', (spoilerRange = Build.spoilerRange[boardID]) ? fileThumb = "//s.4cdn.org/image/spoiler-" + boardID + (Math.floor(1 + spoilerRange * Math.random())) + ".png" : fileThumb = '//s.4cdn.org/image/spoiler.png', file.twidth = file.theight = 100) : (shortFilename = Build.shortFilename(file.name, !isOP), fileThumb = file.turl), fileSize = $.bytesToString(file.size), fileDims = file.url.slice(-4) === '.pdf' ? 'PDF' : "" + file.width + "x" + file.height, fileLink = file.isSpoiler || file.name === shortFilename ? {
innerHTML: "<a href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
} : {
innerHTML: "<a title=\"" + E(file.name) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
}, fileText = file.isSpoiler ? {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\" title=\"" + E(file.name) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
} : {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
}, {
innerHTML: fileText.innerHTML + "<a class=\"fileThumb" + E(file.isSpoiler ? " imgspoiler" : "") + "\" href=\"" + E(file.url) + "\" target=\"_blank\"><img src=\"" + E(fileThumb) + "\" alt=\"" + E(fileSize) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.theight) + "px; width: " + E(file.twidth) + "px;\"></a>"
}) : void 0;
if (file != null ? file.isDeleted : void 0) {
fileCont = {
innerHTML: "<span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span>"
};
} else if (file && boardID === 'f') {
fileCont = {
innerHTML: "<div class=\"fileInfo\"><span class=\"fileText\" id=\"fT" + E(postID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E($.bytesToString(file.size)) + ", " + E(file.width) + "x" + E(file.height) + ", " + E(file.tag) + ")</span></div>"
};
} else if (file) {
if (file.isSpoiler) {
shortFilename = 'Spoiler Image';
if (spoilerRange = Build.spoilerRange[boardID]) {
fileThumb = "//s.4cdn.org/image/spoiler-" + boardID + (Math.floor(1 + spoilerRange * Math.random())) + ".png";
} else {
fileThumb = '//s.4cdn.org/image/spoiler.png';
}
file.twidth = file.theight = 100;
} else {
shortFilename = Build.shortFilename(file.name, !isOP);
fileThumb = file.turl;
}
fileSize = $.bytesToString(file.size);
fileDims = file.url.slice(-4) === '.pdf' ? 'PDF' : "" + file.width + "x" + file.height;
fileLink = file.isSpoiler || file.name === shortFilename ? {
innerHTML: "<a href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
} : {
innerHTML: "<a title=\"" + E(file.name) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
};
fileText = file.isSpoiler ? {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\" title=\"" + E(file.name) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
} : {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
};
({
innerHTML: fileText.innerHTML + "<a class=\"fileThumb" + E(file.isSpoiler ? " imgspoiler" : "") + "\" href=\"" + E(file.url) + "\" target=\"_blank\"><img src=\"" + E(fileThumb) + "\" alt=\"" + E(fileSize) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.theight) + "px; width: " + E(file.twidth) + "px;\"></a>"
});
}
fileBlock = file ? {
innerHTML: "<div class=\"file\" id=\"f" + E(postID) + "\">" + fileCont.innerHTML + "</div>"
} : {
@ -8421,7 +8443,7 @@
posts.forEach(QuoteThreading.insert);
} else {
nodes = [];
Unread.order = new RandomAccessList;
Unread.order = new RandomAccessList();
QuoteThreading.inserted = {};
posts.forEach(function(post) {
if (post.isFetchedQuote) {
@ -14672,9 +14694,9 @@
this.hr = $.el('hr', {
id: 'unread-line'
});
this.posts = new Set;
this.postsQuotingYou = new Set;
this.order = new RandomAccessList;
this.posts = new Set();
this.postsQuotingYou = new Set();
this.order = new RandomAccessList();
this.position = null;
Thread.callbacks.push({
name: 'Unread',
@ -19761,8 +19783,8 @@
return Captcha.noscript.initFrame();
});
}
g.threads = new SimpleDict;
g.posts = new SimpleDict;
g.threads = new SimpleDict();
g.posts = new SimpleDict();
pathname = location.pathname.split('/');
g.BOARD = new Board(pathname[1]);
if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') {

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* appchan x - Version 2.9.43 - 2015-01-09
* appchan x - Version 2.9.43 - 2015-01-10
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -2679,7 +2679,6 @@
req.callbacks.push(cb);
}
return req;
return;
}
rm = function() {
return delete reqs[url];
@ -3206,8 +3205,8 @@
function Board(ID) {
this.ID = ID;
this.threads = new SimpleDict;
this.posts = new SimpleDict;
this.threads = new SimpleDict();
this.posts = new SimpleDict();
g.boards[this] = this;
}
@ -3226,7 +3225,7 @@
this.ID = ID;
this.board = board;
this.fullID = "" + this.board + "." + this.ID;
this.posts = new SimpleDict;
this.posts = new SimpleDict();
this.isDead = false;
this.isHidden = false;
this.isOnTop = false;
@ -5974,7 +5973,7 @@
shortFilename: function(filename) {
var ext, threshold;
threshold = 30;
ext = filename.match(/\.[^.]+$/)[0];
ext = filename.match(/\.?[^\.]*$/)[0];
if (filename.length - ext.length > threshold) {
return "" + filename.slice(0, threshold - 5) + "(...)" + ext;
} else {
@ -6039,7 +6038,6 @@
} else if (data.ext) {
o.file = {
name: (Build.unescape(data.filename)) + data.ext,
name: data.filename + data.ext,
timestamp: "" + data.tim + data.ext,
url: boardID === 'f' ? "//i.4cdn.org/" + boardID + "/" + (encodeURIComponent(data.filename)) + data.ext : "//i.4cdn.org/" + boardID + "/" + data.tim + data.ext,
height: data.h,
@ -6078,7 +6076,7 @@
innerHTML: " <strong class=\"capcode hand id_admin\" title=\"Highlight posts by the Administrator\">## Admin</strong>"
};
capcodeIcon = {
innerHTML: " <img src=\"" + E(staticPath) + "adminicon" + E(gifIcon) + "\" alt=\"Admin Icon\" title=\"This user is the 4chan Administrator.\" class=\"identityIcon retina\">"
innerHTML: " <img src=\"//s.4cdn.org/image/adminicon" + E(retina) + ".gif\" alt=\"Admin Icon\" title=\"This user is the 4chan Administrator.\" class=\"identityIcon retina\">"
};
break;
case 'mod':
@ -6087,14 +6085,16 @@
innerHTML: " <strong class=\"capcode hand id_mod\" title=\"Highlight posts by Moderators\">## Mod</strong>"
};
capcodeIcon = {
innerHTML: " <img src=\"" + E(staticPath) + "modicon" + E(gifIcon) + "\" alt=\"Mod Icon\" title=\"This user is a 4chan Moderator.\" class=\"identityIcon retina\">"
innerHTML: " <img src=\"//s.4cdn.org/image/modicon" + E(retina) + ".gif\" alt=\"Mod Icon\" title=\"This user is a 4chan Moderator.\" class=\"identityIcon retina\">"
};
break;
case 'developer':
capcodeClass = ' capcodeDeveloper';
capcodeStart = {
innerHTML: " <strong class=\"capcode hand id_developer\" title=\"Highlight posts by Developers\">## Developer</strong>"
};
capcodeIcon = {
innerHTML: " <img src=\"" + E(staticPath) + "developericon" + E(gifIcon) + "\" alt=\"Developer Icon\" title=\"This user is a 4chan Developer.\" class=\"identityIcon retina\">"
innerHTML: " <img src=\"//s.4cdn.org/image/developericon" + E(retina) + ".gif\" alt=\"Developer Icon\" title=\"This user is a 4chan Developer.\" class=\"identityIcon retina\">"
};
break;
default:
@ -6176,21 +6176,43 @@
};
/* File Info */
fileCont = (file != null ? file.isDeleted : void 0) ? {
innerHTML: "<span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span>"
} : file && boardID === 'f' ? {
innerHTML: "<div class=\"fileInfo\"><span class=\"fileText\" id=\"fT" + E(postID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E($.bytesToString(file.size)) + ", " + E(file.width) + "x" + E(file.height) + ", " + E(file.tag) + ")</span></div>"
} : file ? (file.isSpoiler ? (shortFilename = 'Spoiler Image', (spoilerRange = Build.spoilerRange[boardID]) ? fileThumb = "//s.4cdn.org/image/spoiler-" + boardID + (Math.floor(1 + spoilerRange * Math.random())) + ".png" : fileThumb = '//s.4cdn.org/image/spoiler.png', file.twidth = file.theight = 100) : (shortFilename = Build.shortFilename(file.name, !isOP), fileThumb = file.turl), fileSize = $.bytesToString(file.size), fileDims = file.url.slice(-4) === '.pdf' ? 'PDF' : "" + file.width + "x" + file.height, fileLink = file.isSpoiler || file.name === shortFilename ? {
innerHTML: "<a href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
} : {
innerHTML: "<a title=\"" + E(file.name) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
}, fileText = file.isSpoiler ? {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\" title=\"" + E(file.name) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
} : {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
}, {
innerHTML: fileText.innerHTML + "<a class=\"fileThumb" + E(file.isSpoiler ? " imgspoiler" : "") + "\" href=\"" + E(file.url) + "\" target=\"_blank\"><img src=\"" + E(fileThumb) + "\" alt=\"" + E(fileSize) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.theight) + "px; width: " + E(file.twidth) + "px;\"></a>"
}) : void 0;
if (file != null ? file.isDeleted : void 0) {
fileCont = {
innerHTML: "<span class=\"fileThumb\"><img src=\"" + E(staticPath) + "filedeleted-res" + E(gifIcon) + "\" alt=\"File deleted.\" class=\"fileDeletedRes retina\"></span>"
};
} else if (file && boardID === 'f') {
fileCont = {
innerHTML: "<div class=\"fileInfo\"><span class=\"fileText\" id=\"fT" + E(postID) + "\">File: <a data-width=\"" + E(file.width) + "\" data-height=\"" + E(file.height) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(file.name) + "</a>-(" + E($.bytesToString(file.size)) + ", " + E(file.width) + "x" + E(file.height) + ", " + E(file.tag) + ")</span></div>"
};
} else if (file) {
if (file.isSpoiler) {
shortFilename = 'Spoiler Image';
if (spoilerRange = Build.spoilerRange[boardID]) {
fileThumb = "//s.4cdn.org/image/spoiler-" + boardID + (Math.floor(1 + spoilerRange * Math.random())) + ".png";
} else {
fileThumb = '//s.4cdn.org/image/spoiler.png';
}
file.twidth = file.theight = 100;
} else {
shortFilename = Build.shortFilename(file.name, !isOP);
fileThumb = file.turl;
}
fileSize = $.bytesToString(file.size);
fileDims = file.url.slice(-4) === '.pdf' ? 'PDF' : "" + file.width + "x" + file.height;
fileLink = file.isSpoiler || file.name === shortFilename ? {
innerHTML: "<a href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
} : {
innerHTML: "<a title=\"" + E(file.name) + "\" href=\"" + E(file.url) + "\" target=\"_blank\">" + E(shortFilename) + "</a>"
};
fileText = file.isSpoiler ? {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\" title=\"" + E(file.name) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
} : {
innerHTML: "<div class=\"fileText\" id=\"fT" + E(postID) + "\">File: " + fileLink.innerHTML + " (" + E(fileSize) + ", " + E(fileDims) + ")</div>"
};
({
innerHTML: fileText.innerHTML + "<a class=\"fileThumb" + E(file.isSpoiler ? " imgspoiler" : "") + "\" href=\"" + E(file.url) + "\" target=\"_blank\"><img src=\"" + E(fileThumb) + "\" alt=\"" + E(fileSize) + "\" data-md5=\"" + E(file.MD5) + "\" style=\"height: " + E(file.theight) + "px; width: " + E(file.twidth) + "px;\"></a>"
});
}
fileBlock = file ? {
innerHTML: "<div class=\"file\" id=\"f" + E(postID) + "\">" + fileCont.innerHTML + "</div>"
} : {
@ -8466,7 +8488,7 @@
posts.forEach(QuoteThreading.insert);
} else {
nodes = [];
Unread.order = new RandomAccessList;
Unread.order = new RandomAccessList();
QuoteThreading.inserted = {};
posts.forEach(function(post) {
if (post.isFetchedQuote) {
@ -14699,9 +14721,9 @@
this.hr = $.el('hr', {
id: 'unread-line'
});
this.posts = new Set;
this.postsQuotingYou = new Set;
this.order = new RandomAccessList;
this.posts = new Set();
this.postsQuotingYou = new Set();
this.order = new RandomAccessList();
this.position = null;
Thread.callbacks.push({
name: 'Unread',
@ -19790,8 +19812,8 @@
return Captcha.noscript.initFrame();
});
}
g.threads = new SimpleDict;
g.posts = new SimpleDict;
g.threads = new SimpleDict();
g.posts = new SimpleDict();
pathname = location.pathname.split('/');
g.BOARD = new Board(pathname[1]);
if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') {

View File

@ -8,7 +8,7 @@ Build =
{'&amp;': '&', '&#039;': "'", '&quot;': '"', '&lt;': '<', '&gt;': '>'}[c]
shortFilename: (filename) ->
threshold = 30
ext = filename.match(/\.[^.]+$/)[0]
ext = filename.match(/\.?[^\.]*$/)[0]
if filename.length - ext.length > threshold
"#{filename[...threshold - 5]}(...)#{ext}"
else
@ -33,24 +33,24 @@ Build =
postFromObject: (data, boardID) ->
o =
# id
postID: data.no
threadID: data.resto or data.no
boardID: boardID
postID: data.no
threadID: data.resto or data.no
boardID: boardID
# info
name: Build.unescape data.name
capcode: data.capcode
tripcode: data.trip
uniqueID: data.id
email: Build.unescape data.email
subject: Build.unescape data.sub
flagCode: data.country
flagName: Build.unescape data.country_name
date: data.now
dateUTC: data.time
comment: {innerHTML: data.com or ''}
name: Build.unescape data.name
capcode: data.capcode
tripcode: data.trip
uniqueID: data.id
email: Build.unescape data.email
subject: Build.unescape data.sub
flagCode: data.country
flagName: Build.unescape data.country_name
date: data.now
dateUTC: data.time
comment: {innerHTML: data.com or ''}
# thread status
isSticky: !!data.sticky
isClosed: !!data.closed
isSticky: !!data.sticky
isClosed: !!data.closed
isArchived: !!data.archived
# file
if data.filedeleted
@ -59,7 +59,6 @@ Build =
else if data.ext
o.file =
name: (Build.unescape data.filename) + data.ext
name: data.filename + data.ext
timestamp: "#{data.tim}#{data.ext}"
url: if boardID is 'f'
"//i.4cdn.org/#{boardID}/#{encodeURIComponent data.filename}#{data.ext}"
@ -98,14 +97,15 @@ Build =
when 'admin', 'admin_highlight'
capcodeClass = ' capcodeAdmin'
capcodeStart = <%= html(' <strong class="capcode hand id_admin" title="Highlight posts by the Administrator">## Admin</strong>') %>
capcodeIcon = <%= html(' <img src="${staticPath}adminicon${gifIcon}" alt="Admin Icon" title="This user is the 4chan Administrator." class="identityIcon retina">') %>
capcodeIcon = <%= html(' <img src="//s.4cdn.org/image/adminicon${retina}.gif" alt="Admin Icon" title="This user is the 4chan Administrator." class="identityIcon retina">') %>
when 'mod'
capcodeClass = ' capcodeMod'
capcodeStart = <%= html(' <strong class="capcode hand id_mod" title="Highlight posts by Moderators">## Mod</strong>') %>
capcodeIcon = <%= html(' <img src="${staticPath}modicon${gifIcon}" alt="Mod Icon" title="This user is a 4chan Moderator." class="identityIcon retina">') %>
capcodeIcon = <%= html(' <img src="//s.4cdn.org/image/modicon${retina}.gif" alt="Mod Icon" title="This user is a 4chan Moderator." class="identityIcon retina">') %>
when 'developer'
capcodeClass = ' capcodeDeveloper'
capcodeStart = <%= html(' <strong class="capcode hand id_developer" title="Highlight posts by Developers">## Developer</strong>') %>
capcodeIcon = <%= html(' <img src="${staticPath}developericon${gifIcon}" alt="Developer Icon" title="This user is a 4chan Developer." class="identityIcon retina">') %>
capcodeIcon = <%= html(' <img src="//s.4cdn.org/image/developericon${retina}.gif" alt="Developer Icon" title="This user is a 4chan Developer." class="identityIcon retina">') %>
else
capcodeClass = ''
capcodeStart = <%= html('') %>
@ -181,14 +181,14 @@ Build =
### File Info ###
fileCont = if file?.isDeleted
<%= html(
if file?.isDeleted
fileCont = <%= html(
'<span class="fileThumb">' +
'<img src="${staticPath}filedeleted-res${gifIcon}" alt="File deleted." class="fileDeletedRes retina">' +
'</span>'
) %>
else if file and boardID is 'f'
<%= html(
fileCont = <%= html(
'<div class="fileInfo"><span class="fileText" id="fT${postID}">' +
'File: <a data-width="${file.width}" data-height="${file.height}" href="${file.url}" target="_blank">${file.name}</a>' +
'-(${$.bytesToString(file.size)}, ${file.width}x${file.height}, ${file.tag})' +

View File

@ -3,8 +3,8 @@ Main =
if location.hostname is 'www.google.com'
return $.ready -> Captcha.noscript.initFrame()
g.threads = new SimpleDict
g.posts = new SimpleDict
g.threads = new SimpleDict()
g.posts = new SimpleDict()
pathname = location.pathname.split '/'
g.BOARD = new Board pathname[1]

View File

@ -70,7 +70,6 @@ do ->
else
req.callbacks.push cb
return req
return
rm = -> delete reqs[url]
try
return unless req = $.ajax url, options

View File

@ -2,7 +2,7 @@ class Board
toString: -> @ID
constructor: (@ID) ->
@threads = new SimpleDict
@posts = new SimpleDict
@threads = new SimpleDict()
@posts = new SimpleDict()
g.boards[@] = @

View File

@ -4,7 +4,7 @@ class Thread
constructor: (@ID, @board) ->
@fullID = "#{@board}.#{@ID}"
@posts = new SimpleDict
@posts = new SimpleDict()
@isDead = false
@isHidden = false
@isOnTop = false

View File

@ -12,9 +12,9 @@ Unread =
@db = new DataBoard 'lastReadPosts', @sync
@hr = $.el 'hr',
id: 'unread-line'
@posts = new Set
@postsQuotingYou = new Set
@order = new RandomAccessList
@posts = new Set()
@postsQuotingYou = new Set()
@order = new RandomAccessList()
@position = null
Thread.callbacks.push

View File

@ -105,7 +105,7 @@ QuoteThreading =
posts.forEach QuoteThreading.insert
else
nodes = []
Unread.order = new RandomAccessList
Unread.order = new RandomAccessList()
QuoteThreading.inserted = {}
posts.forEach (post) ->
return if post.isFetchedQuote