diff --git a/4chan_x.user.js b/4chan_x.user.js index 31745ff97..fd728ae0c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1790,9 +1790,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; @@ -1805,7 +1803,7 @@ node = op.nextSibling; } $.add(op, node); - op.id = $('input[name]', op).name; + op.id = $('input', op).name; return op; }, thread: function(node) { @@ -3039,7 +3037,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 c4cf12bf3..9abc1e96c 100644 --- a/script.coffee +++ b/script.coffee @@ -1321,9 +1321,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', @@ -1333,7 +1331,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) -> @@ -1982,7 +1980,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 @@ -2253,8 +2251,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()