From 084e9ffbe8a7ce561abaea0c341792f441bcdf56 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Fri, 23 Jan 2015 21:42:08 -0800 Subject: [PATCH] Fix gallery crash on files deleted before thread was opened. --- builds/appchan-x.user.js | 38 +++++++++++++++++++------------------- builds/crx/script.js | 38 +++++++++++++++++++------------------- src/Images/Gallery.coffee | 4 ++-- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index dd16075d0..df59aa436 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -5055,13 +5055,13 @@ hidden: true }); $.extend(this.pagelist, { - innerHTML: "
\r\r<\r\r
\r
\r
\r\r>\r\r
" + innerHTML: "
<
>
" }); this.navLinks = $.el('div', { className: 'navLinks' }); $.extend(this.navLinks, { - innerHTML: "\r\r\uf05c\r \r\r\r\r\r\r\r\r" + innerHTML: "\uf05c " }); this.timeEl = $('time#index-last-refresh', this.navLinks); this.searchInput = $('#index-search', this.navLinks); @@ -9861,7 +9861,7 @@ var dialog, event, i, items, match_max, match_min, name, node, nodes, rules, save, setNode; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top:0;right:0;', { - innerHTML: "
\r\r
\r\r
\r\uf00d\r
\r
\r
\r\r\r \r
\r
\r\r\r
\r
\r
\r+\r
\r
\r\rNo selected file\r\r\r\rSpoiler\r\uf0c1\rPost from URL\r+\rDump\r\uf00d\rRemove File\r\r\r\r
\r\r
\r\r\r\r" + innerHTML: "
\uf00d
No selected fileSpoiler\uf0c1Post from URL+Dump\uf00dRemove File
" }) }; setNode = function(name, query) { @@ -11110,7 +11110,7 @@ id: 'a-gallery' }); $.extend(dialog, { - innerHTML: "
\r\r\uf04b\r\uf04d\r\uf107\r\uf00d\r\r\r\r / \r\r
\r
\r\r
\r
\r
\r
" + innerHTML: "
\uf04b\uf04d\uf107\uf00d /
" }); _ref = { buttons: '.gal-buttons', @@ -11154,7 +11154,7 @@ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { file = _ref2[_j]; post = Get.postFromNode(file); - if (post.file.isDead) { + if (!post.file || post.file.isDead) { continue; } Gallery.generateThumb(post); @@ -12425,7 +12425,7 @@ } if (Conf['Floating Embeds']) { this.dialog = UI.dialog('embedding', 'top: 50px; right: 0px;', { - innerHTML: "
\r
\r\uf061\r\uf00d\r
\r
\r" + innerHTML: "
\uf061\uf00d
" }); this.media = $('#media-embed', this.dialog); $.one(d, '4chanXInitFinished', this.ready); @@ -14307,7 +14307,7 @@ } this.db = new DataBoard('watchedThreads', this.refresh, true); this.dialog = UI.dialog('thread-watcher', 'top: 50px; left: 0px;', { - innerHTML: "
\r\rThread Watcher \r\uf021\r\r\r\uf107\r
\r
" + innerHTML: "
Thread Watcher \uf021\uf107
" }); this.status = $('#watcher-status', this.dialog); this.list = this.dialog.lastElementChild; @@ -18992,7 +18992,7 @@ "class": 'dialog' }); $.extend(dialog, { - innerHTML: "\r
\r
\r" + innerHTML: "
" }); Settings.overlay = overlay = $.el('div', { id: 'overlay' @@ -19211,7 +19211,7 @@ filter: function(section) { var select; $.extend(section, { - innerHTML: "\r
" + innerHTML: "
" }); select = $('select', section); $.on(select, 'change', Settings.selectFilter); @@ -19235,14 +19235,14 @@ return; } $.extend(div, { - innerHTML: "
Filter is disabled.
\r

\rUse regular expressions, one per line.
\rLines starting with a # will be ignored.
\rFor example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.
\rMD5 filtering uses exact string matching, not regular expressions.\r

\r\r" + innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

" }); return $('.warning', div).hidden = Conf['Filter']; }, sauce: function(section) { var ta; $.extend(section, { - innerHTML: "
Sauce is disabled.
\r
Lines starting with a # will be ignored.
\r
You can specify a display text by appending ;text:[text] to the URL.
\r\r\r" + innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
" }); ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { @@ -19253,7 +19253,7 @@ advanced: function(section) { var archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, name, o, row, rows, software, ta, table, warning, withCredentials, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; $.extend(section, { - innerHTML: "
\rArchiver\r
404 Redirect is disabled.
\r
\r\r\r\r\r\r\r\r
Thread redirectionPost fetchingFile redirection
\rDisabled selections indicate that only one archive is available for that board and redirection type.\r
\r
\rCustom Board Navigation\r
\rNew lines will be converted into spaces.

\r
In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
\r
Board link: g
\r
Archive link: g-archive
\r
Internal archive link: g-expired
\r
Title link: g-title
\r
Board link (Replace with title when on that board): g-replace
\r
Full text link: g-full
\r
Custom text link: g-text:\"Install Gentoo\"
\r
Index-only link: g-index
\r
Catalog-only link: g-catalog
\r
External link: external-text:\"Google\",\"http://www.google.com\"
\r
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
\r
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-index-text:\"Technology Index\"
\r
Full board list toggle: toggle-all
\r
\r
\r[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\rwill give you
\r[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\rif you are on /g/.\r
\r
\r
\rTime Formatting is disabled.\r
:
\r
Supported format specifiers:
\r
Day: %a, %A, %d, %e
\r
Month: %m, %b, %B
\r
Year: %y, %Y
\r
Hour: %k, %H, %l, %I, %p, %P
\r
Minute: %M
\r
Second: %S
\r
\r
\rQuote Backlinks formatting is disabled.\r
:
\r
\r
\rFile Info Formatting is disabled.\r
:
\r
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\r
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\r
Spoiler indicator: %p
\r
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\r
Resolution: %r (Displays 'PDF' for PDF files)
\r
\r
\rQuick Reply Personas\r\r

\rOne item per line.
\rItems will be added in the relevant input's auto-completion list.
\rPassword items will always be used, since there is no password input.
\rLines starting with a # will be ignored.\r

\r\r
\r
\rUnread Favicon is disabled.\r\r\r\r\r\r\r\r
\r
\rThread Updater is disabled.\r
\rInterval: seconds\r
\r
\r
\r\r\r\r\r\r
\r" + innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
" }); _ref = $$('.warning', section); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -19478,7 +19478,7 @@ keybinds: function(section) { var arr, input, inputs, items, key, tbody, tr, _ref; $.extend(section, { - innerHTML: "
Keybinds are disabled.
\r
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
\r
Press Backspace to disable a keybind.
\r\r\r
ActionsKeybinds
" + innerHTML: "
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
ActionsKeybinds
" }); $('.warning', section).hidden = Conf['Keybinds']; tbody = $('tbody', section); @@ -19626,7 +19626,7 @@ id: name }); $.extend(div, { - innerHTML: "
\r
\r
\r\r" + name + "\r\r\r" + theme['Author'] + "\r\r\r(SAGE)\r\r\r" + theme['Author Tripcode'] + "\r\r\r\rNo.27583594\r\r\r>>edit\r\r\r>>export\r\r\r>>delete\r\r
\r
\r\r>>27582902\r\r
\rPost content is right here.\r
\r

\rSelected\r

\r
" + innerHTML: "
" + name + "" + theme['Author'] + "(SAGE)" + theme['Author Tripcode'] + "No.27583594>>edit>>export>>delete
>>27582902
Post content is right here.

Selected

" }); div.style.backgroundColor = theme['Background Color']; _ref = $$('a[data-color]', div); @@ -19646,7 +19646,7 @@ id: 'addthemes' }); $.extend(div, { - innerHTML: "New Theme\r/\rImport Theme\r\r/\rUndelete Theme" + innerHTML: "New Theme/Import Theme/Undelete Theme" }); $.on($("#newtheme", div), 'click', function() { ThemeTools.init("untitled"); @@ -19677,7 +19677,7 @@ className: theme }); $.extend(div, { - innerHTML: "
\r
\r\r" + name + "\r\r\r" + theme['Author'] + "\r\r\r(SAGE)\r\r\r" + theme['Author Tripcode'] + "\r\r\r\rNo.27583594\r\r
\r
\r\r>>27582902\r\r
\rI forgive you for using VLC to open me. ;__;\r
\r
" + innerHTML: "
" + name + "" + theme['Author'] + "(SAGE)" + theme['Author Tripcode'] + "No.27583594
>>27582902
I forgive you for using VLC to open me. ;__;
" }); $.on(div, 'click', cb.restore); $.add(suboptions, div); @@ -19783,7 +19783,7 @@ className: __indexOf.call(Conf[g.MASCOTSTRING], name) >= 0 ? 'mascot enabled' : 'mascot' }); $.extend(mascotEl, { - innerHTML: "
" + (name.replace(/_/g, ' ')) + "
\r
" + innerHTML: "
" + (name.replace(/_/g, ' ')) + "
" }); $.on(mascotEl, 'click', cb.select); $.on(mascotEl, 'mouseover', addoptions); @@ -19793,7 +19793,7 @@ id: "mascots_batch" }); $.extend(batchmascots, { - innerHTML: "Clear All\r/\rSelect All\r/\rAdd Mascot\r/\rImport Mascot\r/\rUndelete Mascots\r/\rGet More Mascots!" + innerHTML: "Clear All/Select All/Add Mascot/Import Mascot/Undelete Mascots/Get More Mascots!" }); $.on($('#clear', batchmascots), 'click', function() { var enabledMascots, _k, _len2; @@ -19850,7 +19850,7 @@ id: name }); $.extend(mascotEl, { - innerHTML: "
" + (name.replace(/_/g, ' ')) + "
\r
" + innerHTML: "
" + (name.replace(/_/g, ' ')) + "
" }); $.on(mascotEl, 'click', cb.restore); $.add(container, mascotEl); diff --git a/builds/crx/script.js b/builds/crx/script.js index cce9b3ada..0322d6c7e 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -5080,13 +5080,13 @@ hidden: true }); $.extend(this.pagelist, { - innerHTML: "
\r\r<\r\r
\r
\r
\r\r>\r\r
" + innerHTML: "
<
>
" }); this.navLinks = $.el('div', { className: 'navLinks' }); $.extend(this.navLinks, { - innerHTML: "\r\r\uf05c\r \r\r\r\r\r\r\r\r" + innerHTML: "\uf05c " }); this.timeEl = $('time#index-last-refresh', this.navLinks); this.searchInput = $('#index-search', this.navLinks); @@ -9911,7 +9911,7 @@ var dialog, event, i, items, match_max, match_min, name, node, nodes, rules, save, setNode; QR.nodes = nodes = { el: dialog = UI.dialog('qr', 'top:0;right:0;', { - innerHTML: "
\r\r
\r\r
\r\uf00d\r
\r
\r
\r\r\r \r
\r
\r\r\r
\r
\r
\r+\r
\r
\r\rNo selected file\r\r\r\rSpoiler\r\uf0c1\rPost from URL\r+\rDump\r\uf00d\rRemove File\r\r\r\r
\r\r
\r\r\r\r" + innerHTML: "
\uf00d
No selected fileSpoiler\uf0c1Post from URL+Dump\uf00dRemove File
" }) }; setNode = function(name, query) { @@ -11146,7 +11146,7 @@ id: 'a-gallery' }); $.extend(dialog, { - innerHTML: "
\r\r\uf04b\r\uf04d\r\uf107\r\uf00d\r\r\r\r / \r\r
\r
\r\r
\r
\r
\r
" + innerHTML: "
\uf04b\uf04d\uf107\uf00d /
" }); _ref = { buttons: '.gal-buttons', @@ -11190,7 +11190,7 @@ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { file = _ref2[_j]; post = Get.postFromNode(file); - if (post.file.isDead) { + if (!post.file || post.file.isDead) { continue; } Gallery.generateThumb(post); @@ -12448,7 +12448,7 @@ } if (Conf['Floating Embeds']) { this.dialog = UI.dialog('embedding', 'top: 50px; right: 0px;', { - innerHTML: "
\r
\r\uf061\r\uf00d\r
\r
\r" + innerHTML: "
\uf061\uf00d
" }); this.media = $('#media-embed', this.dialog); $.one(d, '4chanXInitFinished', this.ready); @@ -14330,7 +14330,7 @@ } this.db = new DataBoard('watchedThreads', this.refresh, true); this.dialog = UI.dialog('thread-watcher', 'top: 50px; left: 0px;', { - innerHTML: "
\r\rThread Watcher \r\uf021\r\r\r\uf107\r
\r
" + innerHTML: "
Thread Watcher \uf021\uf107
" }); this.status = $('#watcher-status', this.dialog); this.list = this.dialog.lastElementChild; @@ -19025,7 +19025,7 @@ "class": 'dialog' }); $.extend(dialog, { - innerHTML: "\r
\r
\r" + innerHTML: "
" }); Settings.overlay = overlay = $.el('div', { id: 'overlay' @@ -19242,7 +19242,7 @@ filter: function(section) { var select; $.extend(section, { - innerHTML: "\r
" + innerHTML: "
" }); select = $('select', section); $.on(select, 'change', Settings.selectFilter); @@ -19266,14 +19266,14 @@ return; } $.extend(div, { - innerHTML: "
Filter is disabled.
\r

\rUse regular expressions, one per line.
\rLines starting with a # will be ignored.
\rFor example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.
\rMD5 filtering uses exact string matching, not regular expressions.\r

\r\r" + innerHTML: "
Filter is disabled.

Use regular expressions, one per line.
Lines starting with a # will be ignored.
For example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.
MD5 filtering uses exact string matching, not regular expressions.

" }); return $('.warning', div).hidden = Conf['Filter']; }, sauce: function(section) { var ta; $.extend(section, { - innerHTML: "
Sauce is disabled.
\r
Lines starting with a # will be ignored.
\r
You can specify a display text by appending ;text:[text] to the URL.
\r\r\r" + innerHTML: "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
" }); ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { @@ -19284,7 +19284,7 @@ advanced: function(section) { var archBoards, boardID, boardOptions, boardSelect, boards, customCSS, files, i, input, inputs, interval, item, items, name, o, row, rows, software, ta, table, warning, withCredentials, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6; $.extend(section, { - innerHTML: "
\rArchiver\r
404 Redirect is disabled.
\r
\r\r\r\r\r\r\r\r
Thread redirectionPost fetchingFile redirection
\rDisabled selections indicate that only one archive is available for that board and redirection type.\r
\r
\rCustom Board Navigation\r
\rNew lines will be converted into spaces.

\r
In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
\r
Board link: g
\r
Archive link: g-archive
\r
Internal archive link: g-expired
\r
Title link: g-title
\r
Board link (Replace with title when on that board): g-replace
\r
Full text link: g-full
\r
Custom text link: g-text:\"Install Gentoo\"
\r
Index-only link: g-index
\r
Catalog-only link: g-catalog
\r
External link: external-text:\"Google\",\"http://www.google.com\"
\r
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
\r
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-index-text:\"Technology Index\"
\r
Full board list toggle: toggle-all
\r
\r
\r[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\rwill give you
\r[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\rif you are on /g/.\r
\r
\r
\rTime Formatting is disabled.\r
:
\r
Supported format specifiers:
\r
Day: %a, %A, %d, %e
\r
Month: %m, %b, %B
\r
Year: %y, %Y
\r
Hour: %k, %H, %l, %I, %p, %P
\r
Minute: %M
\r
Second: %S
\r
\r
\rQuote Backlinks formatting is disabled.\r
:
\r
\r
\rFile Info Formatting is disabled.\r
:
\r
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
\r
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
\r
Spoiler indicator: %p
\r
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
\r
Resolution: %r (Displays 'PDF' for PDF files)
\r
\r
\rQuick Reply Personas\r\r

\rOne item per line.
\rItems will be added in the relevant input's auto-completion list.
\rPassword items will always be used, since there is no password input.
\rLines starting with a # will be ignored.\r

\r\r
\r
\rUnread Favicon is disabled.\r\r\r\r\r\r\r\r
\r
\rThread Updater is disabled.\r
\rInterval: seconds\r
\r
\r
\r\r\r\r\r\r
\r" + innerHTML: "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Twitter link (@).
Board link: g
Archive link: g-archive
Internal archive link: g-expired
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Index mode: g-mode:\"type\" where type is paged, all threads or catalog
Index sort: g-sort:\"type\" where type is bump order, last reply, creation date, reply count or file countCombinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
if you are on /g/.
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas

One item per line.
Items will be added in the relevant input's auto-completion list.
Password items will always be used, since there is no password input.
Lines starting with a # will be ignored.

Unread Favicon is disabled.
Thread Updater is disabled.
Interval: seconds
" }); _ref = $$('.warning', section); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -19509,7 +19509,7 @@ keybinds: function(section) { var arr, input, inputs, items, key, tbody, tr, _ref; $.extend(section, { - innerHTML: "
Keybinds are disabled.
\r
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
\r
Press Backspace to disable a keybind.
\r\r\r
ActionsKeybinds
" + innerHTML: "
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
ActionsKeybinds
" }); $('.warning', section).hidden = Conf['Keybinds']; tbody = $('tbody', section); @@ -19657,7 +19657,7 @@ id: name }); $.extend(div, { - innerHTML: "
\r
\r
\r\r" + name + "\r\r\r" + theme['Author'] + "\r\r\r(SAGE)\r\r\r" + theme['Author Tripcode'] + "\r\r\r\rNo.27583594\r\r\r>>edit\r\r\r>>export\r\r\r>>delete\r\r
\r
\r\r>>27582902\r\r
\rPost content is right here.\r
\r

\rSelected\r

\r
" + innerHTML: "
" + name + "" + theme['Author'] + "(SAGE)" + theme['Author Tripcode'] + "No.27583594>>edit>>export>>delete
>>27582902
Post content is right here.

Selected

" }); div.style.backgroundColor = theme['Background Color']; _ref = $$('a[data-color]', div); @@ -19677,7 +19677,7 @@ id: 'addthemes' }); $.extend(div, { - innerHTML: "New Theme\r/\rImport Theme\r\r/\rUndelete Theme" + innerHTML: "New Theme/Import Theme/Undelete Theme" }); $.on($("#newtheme", div), 'click', function() { ThemeTools.init("untitled"); @@ -19708,7 +19708,7 @@ className: theme }); $.extend(div, { - innerHTML: "
\r
\r\r" + name + "\r\r\r" + theme['Author'] + "\r\r\r(SAGE)\r\r\r" + theme['Author Tripcode'] + "\r\r\r\rNo.27583594\r\r
\r
\r\r>>27582902\r\r
\rI forgive you for using VLC to open me. ;__;\r
\r
" + innerHTML: "
" + name + "" + theme['Author'] + "(SAGE)" + theme['Author Tripcode'] + "No.27583594
>>27582902
I forgive you for using VLC to open me. ;__;
" }); $.on(div, 'click', cb.restore); $.add(suboptions, div); @@ -19814,7 +19814,7 @@ className: __indexOf.call(Conf[g.MASCOTSTRING], name) >= 0 ? 'mascot enabled' : 'mascot' }); $.extend(mascotEl, { - innerHTML: "
" + (name.replace(/_/g, ' ')) + "
\r
" + innerHTML: "
" + (name.replace(/_/g, ' ')) + "
" }); $.on(mascotEl, 'click', cb.select); $.on(mascotEl, 'mouseover', addoptions); @@ -19824,7 +19824,7 @@ id: "mascots_batch" }); $.extend(batchmascots, { - innerHTML: "Clear All\r/\rSelect All\r/\rAdd Mascot\r/\rImport Mascot\r/\rUndelete Mascots\r/\rGet More Mascots!" + innerHTML: "Clear All/Select All/Add Mascot/Import Mascot/Undelete Mascots/Get More Mascots!" }); $.on($('#clear', batchmascots), 'click', function() { var enabledMascots, _k, _len2; @@ -19881,7 +19881,7 @@ id: name }); $.extend(mascotEl, { - innerHTML: "
" + (name.replace(/_/g, ' ')) + "
\r
" + innerHTML: "
" + (name.replace(/_/g, ' ')) + "
" }); $.on(mascotEl, 'click', cb.restore); $.add(container, mascotEl); diff --git a/src/Images/Gallery.coffee b/src/Images/Gallery.coffee index 10a1759fd..b93bf7bb3 100644 --- a/src/Images/Gallery.coffee +++ b/src/Images/Gallery.coffee @@ -81,7 +81,7 @@ Gallery = for file in $$ '.post .file' post = Get.postFromNode file - continue if post.file.isDead + continue if !post.file or post.file.isDead Gallery.generateThumb post # If no image to open is given, pick image we have scrolled to. if !image and Gallery.fullIDs[post.fullID] @@ -333,4 +333,4 @@ Gallery = $.on delayInput, 'change', $.cb.value subEntries.push el: delayLabel - subEntries \ No newline at end of file + subEntries