From 8f043ac1bb9c95e7b1a97eee05fea1311726e606 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 23 Feb 2012 20:13:47 +0100 Subject: [PATCH 1/5] Add /vg/ image redirection. --- 4chan_x.user.js | 1 + script.coffee | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 96fe9a2cf..b651da278 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3337,6 +3337,7 @@ case 'm': case 'tg': case 'u': + case 'vg': return "http://archive.foolz.us/" + href[3] + "/full_image/" + href[5]; } }, diff --git a/script.coffee b/script.coffee index 23d9f3d27..a5cdf93a6 100644 --- a/script.coffee +++ b/script.coffee @@ -2724,7 +2724,7 @@ redirect = # Do not use g.BOARD, the image url can originate from a cross-quote. return unless conf['404 Redirect'] switch href[3] - when 'a', 'jp', 'm', 'tg', 'u' + when 'a', 'jp', 'm', 'tg', 'u', 'vg' "http://archive.foolz.us/#{href[3]}/full_image/#{href[5]}" thread: -> return unless conf['404 Redirect'] From d2294049bf92adff1375e414a7e4014ca2567b04 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 23 Feb 2012 20:14:46 +0100 Subject: [PATCH 2/5] /vg/, like /b/, has only 3 replies per thread on board pages. --- 4chan_x.user.js | 1 + script.coffee | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index b651da278..ad1b802d8 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -790,6 +790,7 @@ num = (function() { switch (g.BOARD) { case 'b': + case 'vg': return 3; case 't': return 1; diff --git a/script.coffee b/script.coffee index a5cdf93a6..fd0563d8e 100644 --- a/script.coffee +++ b/script.coffee @@ -661,7 +661,7 @@ expandThread = a.textContent = a.textContent.replace '-', '+' #goddamit moot num = switch g.BOARD - when 'b' then 3 + when 'b', 'vg' then 3 when 't' then 1 else 5 table = $.x "following::br[@clear]/preceding::table[#{num}]", a From f2ce860998faafaa4ec12148e5a4d3f6aa14420e Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 23 Feb 2012 20:16:49 +0100 Subject: [PATCH 3/5] Prevent thumbnail dimension flickering during page load. --- 4chan_x.user.js | 8 ++++---- script.coffee | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index ad1b802d8..5c76fd49a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -4006,13 +4006,13 @@ img[md5], img[md5] + img {\ /* revealed spoilers do not have height/width,\ this fixed "expanded" auto-gifs */\ img[md5] {\ - max-height: 126px;\ - max-width: 126px;\ -}\ -.op > a > img[md5] {\ max-height: 251px;\ max-width: 251px;\ }\ +td > .filesize > img[md5] {\ + max-height: 126px;\ + max-width: 126px;\ +}\ \ #qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks {\ position: fixed;\ diff --git a/script.coffee b/script.coffee index fd0563d8e..7528224c5 100644 --- a/script.coffee +++ b/script.coffee @@ -3335,13 +3335,13 @@ img[md5], img[md5] + img { /* revealed spoilers do not have height/width, this fixed "expanded" auto-gifs */ img[md5] { - max-height: 126px; - max-width: 126px; -} -.op > a > img[md5] { max-height: 251px; max-width: 251px; } +td > .filesize > img[md5] { + max-height: 126px; + max-width: 126px; +} #qr, #qp, #updater, #stats, #ihover, #overlay, #navlinks { position: fixed; From 82f2dec8523bf55f766815a5533e15558f799a6c Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 23 Feb 2012 20:43:42 +0100 Subject: [PATCH 4/5] Use × instead of x as character representing closing action. --- 4chan_x.user.js | 6 +++--- script.coffee | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 5c76fd49a..576367420 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1523,7 +1523,7 @@ className: 'preview', draggable: true, href: 'javascript:;', - innerHTML: 'x' + innerHTML: '×' }); $('input', this.el).checked = this.spoiler; $.on(this.el, 'click', function() { @@ -1717,7 +1717,7 @@ qr.el = ui.dialog('qr', 'top:0;right:0;', '\
\ Quick Reply \ - x\ + ×\
\
\
\ @@ -2642,7 +2642,7 @@ for (id in _ref) { props = _ref[id]; x = $.el('a', { - textContent: 'X', + textContent: '\u00d7', href: 'javascript:;' }); $.on(x, 'click', watcher.cb.x); diff --git a/script.coffee b/script.coffee index 7528224c5..4f30f7c0a 100644 --- a/script.coffee +++ b/script.coffee @@ -1226,7 +1226,7 @@ qr = className: 'preview' draggable: true href: 'javascript:;' - innerHTML: 'x' + innerHTML: '×' $('input', @el).checked = @spoiler $.on @el, 'click', => @select() $.on $('.remove', @el), 'click', (e) => @@ -1363,7 +1363,7 @@ qr = qr.el = ui.dialog 'qr', 'top:0;right:0;', '
Quick Reply - x + ×
@@ -2178,7 +2178,8 @@ watcher = for board of watched for id, props of watched[board] x = $.el 'a', - textContent: 'X' + # \u00d7 is × + textContent: '\u00d7' href: 'javascript:;' $.on x, 'click', watcher.cb.x link = $.el 'a', props From b966065020f3c59713a9d1bd91dc657e65ca553d Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 23 Feb 2012 20:45:53 +0100 Subject: [PATCH 5/5] Version number in the options will now link to the changelog. Close #255. --- 4chan_x.user.js | 3 ++- script.coffee | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 576367420..8199a2ef1 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2114,7 +2114,8 @@ className: 'reply dialog', innerHTML: '
\
\ - 4chan X | ' + VERSION + '\ + 4chan X\ + | ' + VERSION + '\ | Issues\
\
\ diff --git a/script.coffee b/script.coffee index 4f30f7c0a..38bfccb71 100644 --- a/script.coffee +++ b/script.coffee @@ -1711,7 +1711,8 @@ options = className: 'reply dialog' innerHTML: '
- 4chan X | ' + VERSION + ' + 4chan X + | ' + VERSION + ' | Issues