From 2fa4e4d81ee1eb30d89f1c0525178bcde4af9098 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 15 Feb 2012 13:32:53 +0100 Subject: [PATCH] Fix post number quoting for /b/ and /v/. --- 4chan_x.user.js | 2 +- changelog | 2 ++ script.coffee | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 153addd2d..9a87aa47f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1348,7 +1348,7 @@ if (!g.REPLY) { $('select', qr.el).value = $.x('ancestor::div[@class="thread"]/div', this).id; } - id = this.textContent; + id = this.hash.slice(2); text = ">>" + id + "\n"; sel = window.getSelection(); if ((s = sel.toString()) && id === ((_ref = $.x('ancestor-or-self::blockquote/preceding-sibling::input', sel.anchorNode)) != null ? _ref.name : void 0)) { diff --git a/changelog b/changelog index 035796cbb..44edf27b5 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- Mayhem + Fix post number quoting on /b/ and /v/. 2.26.1 - Mayhem diff --git a/script.coffee b/script.coffee index 36c97154c..dec0c1203 100644 --- a/script.coffee +++ b/script.coffee @@ -996,7 +996,8 @@ qr = unless g.REPLY $('select', qr.el).value = $.x('ancestor::div[@class="thread"]/div', @).id - id = @textContent + # Make sure we get the correct number, even with XXX censors + id = @hash[2..] text = ">>#{id}\n" sel = window.getSelection()