diff --git a/LICENSE b/LICENSE index 589a954f7..8d6bcff9f 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.43 - 2013-12-06 +* 4chan X - Version 1.2.43 - 2013-12-09 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 5342d67a2..11df58003 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -22,7 +22,7 @@ // ==/UserScript== /* -* 4chan X - Version 1.2.43 - 2013-12-06 +* 4chan X - Version 1.2.43 - 2013-12-09 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -2752,7 +2752,7 @@ } flag = !flagCode ? '' : boardID === 'pol' ? "  + flagCode + " : " "; if (file != null ? file.isDeleted : void 0) { - fileHTML = isOP ? ("
") + ("File deleted.") + "
" : ("
") + ("File deleted.") + "
"; + fileHTML = isOP ? ("
") + ("File deleted.") + "
" : ("
") + ("File deleted.") + "
"; } else if (file) { ext = file.name.slice(-3); if (!file.twidth && !file.theight && ext === 'gif') { @@ -10723,7 +10723,7 @@ if (!this.file || this.isClone) { return; } - return this.file.text.innerHTML = FileInfo.funk(FileInfo, this); + return this.file.text.innerHTML = "" + (FileInfo.funk(FileInfo, this)) + ""; }, createFunc: function(format) { var code; @@ -11295,7 +11295,7 @@ Keybinds.hl(0, threadRoot); break; case Conf['Hide']: - if (g.VIEW === 'index') { + if (ThreadHiding.db) { ThreadHiding.toggle(thread); } break; @@ -11408,7 +11408,7 @@ } }, hl: function(delta, thread) { - var axe, height, next, postEl, replies, reply, root, _i, _len; + var axis, height, next, postEl, replies, reply, root, _i, _len; postEl = $('.reply.highlight', thread); if (!delta) { @@ -11421,8 +11421,8 @@ height = postEl.getBoundingClientRect().height; if (Header.getTopOf(postEl) >= -height && Header.getBottomOf(postEl) >= -height) { root = postEl.parentNode; - axe = delta === +1 ? 'following' : 'preceding'; - if (!(next = $.x("" + axe + "-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root))) { + axis = delta === +1 ? 'following' : 'preceding'; + if (!(next = $.x("" + axis + "-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root))) { return; } Header.scrollToIfNeeded(next, delta === +1); @@ -11518,11 +11518,11 @@ return $('.board'); }, scroll: function(delta) { - var axe, next, thread, top; + var axis, next, thread, top; thread = Nav.getThread(); - axe = delta === +1 ? 'following' : 'preceding'; - if (next = $.x("" + axe + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) { + axis = delta === +1 ? 'following' : 'preceding'; + if (next = $.x("" + axis + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) { top = Header.getTopOf(thread); if (delta === +1 && top < 5 || delta === -1 && top > -5) { thread = next; diff --git a/builds/crx/script.js b/builds/crx/script.js index 344f1c4a7..81f5e43d8 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.43 - 2013-12-06 +* 4chan X - Version 1.2.43 - 2013-12-09 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -2764,7 +2764,7 @@ } flag = !flagCode ? '' : boardID === 'pol' ? "  + flagCode + " : " "; if (file != null ? file.isDeleted : void 0) { - fileHTML = isOP ? ("
") + ("File deleted.") + "
" : ("
") + ("File deleted.") + "
"; + fileHTML = isOP ? ("
") + ("File deleted.") + "
" : ("
") + ("File deleted.") + "
"; } else if (file) { ext = file.name.slice(-3); if (!file.twidth && !file.theight && ext === 'gif') { @@ -10714,7 +10714,7 @@ if (!this.file || this.isClone) { return; } - return this.file.text.innerHTML = FileInfo.funk(FileInfo, this); + return this.file.text.innerHTML = "" + (FileInfo.funk(FileInfo, this)) + ""; }, createFunc: function(format) { var code; @@ -11286,7 +11286,7 @@ Keybinds.hl(0, threadRoot); break; case Conf['Hide']: - if (g.VIEW === 'index') { + if (ThreadHiding.db) { ThreadHiding.toggle(thread); } break; @@ -11399,7 +11399,7 @@ } }, hl: function(delta, thread) { - var axe, height, next, postEl, replies, reply, root, _i, _len; + var axis, height, next, postEl, replies, reply, root, _i, _len; postEl = $('.reply.highlight', thread); if (!delta) { @@ -11412,8 +11412,8 @@ height = postEl.getBoundingClientRect().height; if (Header.getTopOf(postEl) >= -height && Header.getBottomOf(postEl) >= -height) { root = postEl.parentNode; - axe = delta === +1 ? 'following' : 'preceding'; - if (!(next = $.x("" + axe + "-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root))) { + axis = delta === +1 ? 'following' : 'preceding'; + if (!(next = $.x("" + axis + "-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root))) { return; } Header.scrollToIfNeeded(next, delta === +1); @@ -11509,11 +11509,11 @@ return $('.board'); }, scroll: function(delta) { - var axe, next, thread, top; + var axis, next, thread, top; thread = Nav.getThread(); - axe = delta === +1 ? 'following' : 'preceding'; - if (next = $.x("" + axe + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) { + axis = delta === +1 ? 'following' : 'preceding'; + if (next = $.x("" + axis + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) { top = Header.getTopOf(thread); if (delta === +1 && top < 5 || delta === -1 && top > -5) { thread = next; diff --git a/css/style.css b/css/style.css index 4d4347ff1..21fb6dc8c 100644 --- a/css/style.css +++ b/css/style.css @@ -540,8 +540,8 @@ a.hide-announcement { } /* File */ -.fileText:hover .fntrunc, -.fileText:not(:hover) .fnfull, +.file-info:hover .fntrunc, +.file-info:not(:hover) .fnfull, .expanded-image > .post > .file > .fileThumb > img[data-md5], :not(.expanded-image) > .post > .file > .fileThumb > .full-image { display: none; diff --git a/src/General/Build.coffee b/src/General/Build.coffee index 42dc76b6a..6854358c4 100755 --- a/src/General/Build.coffee +++ b/src/General/Build.coffee @@ -124,7 +124,7 @@ Build = if file?.isDeleted fileHTML = if isOP - "
" + + "
" + "File deleted." + "
" else diff --git a/src/Miscellaneous/FileInfo.coffee b/src/Miscellaneous/FileInfo.coffee index 89d694313..e58f9faef 100755 --- a/src/Miscellaneous/FileInfo.coffee +++ b/src/Miscellaneous/FileInfo.coffee @@ -8,7 +8,7 @@ FileInfo = cb: @node node: -> return if !@file or @isClone - @file.text.innerHTML = FileInfo.funk FileInfo, @ + @file.text.innerHTML = "#{FileInfo.funk FileInfo, @}" createFunc: (format) -> code = format.replace /%(.)/g, (s, c) -> if c of FileInfo.formatters @@ -21,11 +21,10 @@ FileInfo = return "#{size.toFixed()} Bytes" i = 1 + ['KB', 'MB'].indexOf unit size /= 1024 while i-- - size = - if unit is 'MB' - Math.round(size * 100) / 100 - else - size.toFixed() + size = if unit is 'MB' + Math.round(size * 100) / 100 + else + size.toFixed() "#{size} #{unit}" escape: (name) -> name.replace /<|>/g, (c) -> diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index 27549edfa..68e2ae684 100755 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -126,7 +126,7 @@ Keybinds = when Conf['Deselect reply'] Keybinds.hl 0, threadRoot when Conf['Hide'] - ThreadHiding.toggle thread if g.VIEW is 'index' + ThreadHiding.toggle thread if ThreadHiding.db when Conf['Previous Post Quoting You'] QuoteYou.cb.seek 'preceding' when Conf['Next Post Quoting You'] @@ -222,11 +222,11 @@ Keybinds = {height} = postEl.getBoundingClientRect() if Header.getTopOf(postEl) >= -height and Header.getBottomOf(postEl) >= -height # We're at least partially visible root = postEl.parentNode - axe = if delta is +1 + axis = if delta is +1 'following' else 'preceding' - return unless next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root + return unless next = $.x "#{axis}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root Header.scrollToIfNeeded next, delta is +1 @focus next $.rmClass postEl, 'highlight' diff --git a/src/Miscellaneous/Nav.coffee b/src/Miscellaneous/Nav.coffee index 59c532ec1..659cce4e1 100755 --- a/src/Miscellaneous/Nav.coffee +++ b/src/Miscellaneous/Nav.coffee @@ -48,11 +48,11 @@ Nav = scroll: (delta) -> thread = Nav.getThread() - axe = if delta is +1 + axis = if delta is +1 'following' else 'preceding' - if next = $.x "#{axe}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread + if next = $.x "#{axis}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread # Unless we're not at the beginning of the current thread, # and thus wanting to move to beginning, # or we're above the first thread and don't want to skip it.