diff --git a/4chan_x.user.js b/4chan_x.user.js index 51c9264be..d2f2a7bbf 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2598,7 +2598,7 @@ return g.callbacks.push(function(root) { var a, span; if (!(a = $('.reportbutton', root))) { - span = $('span[id^=no]', root); + span = $('span[id]', root); a = $.el('a', { className: 'reportbutton', innerHTML: '[ ! ]' @@ -2611,7 +2611,7 @@ }, report: function() { var id, set, url; - url = "http://sys.4chan.org/" + g.BOARD + "/imgboard.php?mode=report&no=" + this.previousElementSibling.childNodes[1].textContent; + url = "http://sys.4chan.org/" + g.BOARD + "/imgboard.php?mode=report&no=" + ($.x('preceding-sibling::input', this).name); id = "" + NAMESPACE + "popup"; set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200"; return window.open(url, id, set); diff --git a/script.coffee b/script.coffee index 8595c8a2a..8b325e807 100644 --- a/script.coffee +++ b/script.coffee @@ -1919,7 +1919,7 @@ reportButton = init: -> g.callbacks.push (root) -> if not a = $ '.reportbutton', root - span = $ 'span[id^=no]', root + span = $ 'span[id]', root a = $.el 'a', className: 'reportbutton' innerHTML: '[ ! ]' @@ -1927,7 +1927,7 @@ reportButton = $.after span, $.tn(' ') $.bind a, 'click', reportButton.report report: -> - url = "http://sys.4chan.org/#{g.BOARD}/imgboard.php?mode=report&no=#{@previousElementSibling.childNodes[1].textContent}" + url = "http://sys.4chan.org/#{g.BOARD}/imgboard.php?mode=report&no=#{$.x('preceding-sibling::input', @).name}" id = "#{NAMESPACE}popup" set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200" window.open url, id, set