From c35324d46eee117490dbf48a42ee33f2408e4a26 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 28 Sep 2011 19:24:15 +0200 Subject: [PATCH 1/3] Derp, threading.init is always executed first. --- 4chan_x.user.js | 4 +--- script.coffee | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index c8fa69a00..ecbaa485a 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1788,9 +1788,7 @@ }; threading = { init: function() { - var node; - node = $('form[name=delform] > *:not([id])'); - return threading.thread(node); + return threading.thread($('body > form').firstChild); }, op: function(node) { var op; diff --git a/script.coffee b/script.coffee index 2d6340813..a4de72b23 100644 --- a/script.coffee +++ b/script.coffee @@ -1318,9 +1318,7 @@ QR = threading = init: -> - # don't thread image controls - node = $ 'form[name=delform] > *:not([id])' - threading.thread node + threading.thread $('body > form').firstChild op: (node) -> op = $.el 'div', From 293943c5b6a44c4d8a4c742b52a9da299b018f32 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 28 Sep 2011 19:34:47 +0200 Subject: [PATCH 2/3] Call me when there will be more than one input element in the OP. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index ecbaa485a..f30a4d457 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1801,7 +1801,7 @@ node = op.nextSibling; } $.add(op, node); - op.id = $('input[name]', op).name; + op.id = $('input', op).name; return op; }, thread: function(node) { diff --git a/script.coffee b/script.coffee index a4de72b23..21a4347b7 100644 --- a/script.coffee +++ b/script.coffee @@ -1328,7 +1328,7 @@ threading = $.add op, node node = op.nextSibling $.add op, node #add the blockquote - op.id = $('input[name]', op).name + op.id = $('input', op).name op thread: (node) -> From 3bcba4e4ceff319410510e53317469054fa7f00d Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 28 Sep 2011 19:55:57 +0200 Subject: [PATCH 3/3] Stuff. --- 4chan_x.user.js | 2 +- script.coffee | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index f30a4d457..ed9351553 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3035,7 +3035,7 @@ tzOffset = (new Date()).getTimezoneOffset() / 60; g.chanOffset = 5 - tzOffset; if ($.isDST()) { - g.chanOffset -= 1; + g.chanOffset--; } lastChecked = $.get('lastChecked', 0); now = Date.now(); diff --git a/script.coffee b/script.coffee index 21a4347b7..9b27b1e54 100644 --- a/script.coffee +++ b/script.coffee @@ -1977,7 +1977,7 @@ unread = Favicon = init: -> - favicon = $ 'link[rel="shortcut icon"]', d.head + favicon = $ 'link[rel="shortcut icon"]', d.head favicon.type = 'image/x-icon' {href} = favicon Favicon.default = href @@ -2248,8 +2248,9 @@ Main = g.hiddenReplies = $.get "hiddenReplies/#{g.BOARD}/", {} tzOffset = (new Date()).getTimezoneOffset() / 60 # GMT -8 is given as +480; would GMT +8 be -480 ? - g.chanOffset = 5 - tzOffset# 4chan = EST = GMT -5 - if $.isDST() then g.chanOffset -= 1 + g.chanOffset = 5 - tzOffset + # 4chan = EST = GMT -5 + g.chanOffset-- if $.isDST() lastChecked = $.get 'lastChecked', 0 now = Date.now()