diff --git a/4chan_x.user.js b/4chan_x.user.js
index 4ff0802d7..8b6cc557b 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -987,7 +987,7 @@
quote.href = "res/" + href;
}
id = reply.id.slice(2);
- link = $('.postNum > a[title="Highlight this post"]', reply);
+ link = $('a[title="Highlight this post"]', reply);
link.href = "res/" + threadID + "#p" + id;
link.nextSibling.href = "res/" + threadID + "#q" + id;
nodes.push(reply);
@@ -1567,7 +1567,7 @@
},
qr: function(thread, quote) {
if (quote) {
- QR.quote.call($('.postNum > a[title="Quote this post"]', $('.post.highlight', thread) || thread));
+ QR.quote.call($('a[title="Quote this post"]', $('.post.highlight', thread) || thread));
} else {
QR.open();
}
@@ -1722,7 +1722,7 @@
return $.on(d, 'dragstart dragend', QR.drag);
},
node: function(post) {
- return $.on($('.postNum > a[title="Quote this post"]', post.el), 'click', QR.quote);
+ return $.on($('a[title="Quote this post"]', post.el), 'click', QR.quote);
},
open: function() {
if (QR.el) {
@@ -3508,7 +3508,7 @@
}
quote.href = "/" + board + "/res/" + href;
}
- link = $('.postNum > a[title="Highlight this post"]', pc);
+ link = $('a[title="Highlight this post"]', pc);
link.href = "/" + board + "/res/" + threadID + "#p" + postID;
link.nextSibling.href = "/" + board + "/res/" + threadID + "#q" + postID;
$.replace(root.firstChild, pc);
@@ -3531,7 +3531,7 @@
piM = $.el('div', {
id: "pim" + postID,
className: 'postInfoM mobile',
- innerHTML: "
" + data.fourchan_date + "
No." + postID + ""
+ innerHTML: "
" + data.fourchan_date + "
No." + postID + ""
});
$('.name', piM).textContent = name;
$('.subject', piM).textContent = subject;
@@ -4052,7 +4052,7 @@
nodes.push($.tn(text));
}
id = quote.match(/\d+$/)[0];
- board = (m = quote.match(/^>>>\/([a-z\d]+)/)) ? m[1] : $('.postNum > a[title="Highlight this post"]', post.el).pathname.split('/')[1];
+ board = (m = quote.match(/^>>>\/([a-z\d]+)/)) ? m[1] : $('a[title="Highlight this post"]', post.el).pathname.split('/')[1];
nodes.push(a = $.el('a', {
textContent: "" + quote + "\u00A0(Dead)"
}));
@@ -4130,7 +4130,7 @@
pwd = (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : $.id('delPassword').value;
menu = $.id('menu');
id = menu.dataset.id;
- board = $('.postNum > a[title="Highlight this post"]', $.id(menu.dataset.rootid)).pathname.split('/')[1];
+ board = $('a[title="Highlight this post"]', $.id(menu.dataset.rootid)).pathname.split('/')[1];
self = this;
form = {
mode: 'usrdel',
@@ -4187,7 +4187,7 @@
},
report: function() {
var a, id, set, url;
- a = $('.postNum > a[title="Highlight this post"]', $.id(this.parentNode.dataset.rootid));
+ a = $('a[title="Highlight this post"]', $.id(this.parentNode.dataset.rootid));
url = "//sys.4chan.org/" + (a.pathname.split('/')[1]) + "/imgboard.php?mode=report&no=" + this.parentNode.dataset.id;
id = Date.now();
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200";
@@ -4233,7 +4233,7 @@
el: a,
open: function(post) {
var href, path;
- path = $('.postNum > a[title="Highlight this post"]', post.el).pathname.split('/');
+ path = $('a[title="Highlight this post"]', post.el).pathname.split('/');
if ((href = Redirect.thread(path[1], path[3], post.ID)) === ("//boards.4chan.org/" + path[1] + "/")) {
return false;
}
diff --git a/script.coffee b/script.coffee
index 975b1bb7e..b3f2932e6 100644
--- a/script.coffee
+++ b/script.coffee
@@ -799,7 +799,7 @@ ExpandThread =
continue if href[0] is '/' # Cross-board quote
quote.href = "res/#{href}" # Fix pathnames
id = reply.id[2..]
- link = $ '.postNum > a[title="Highlight this post"]', reply
+ link = $ 'a[title="Highlight this post"]', reply
link.href = "res/#{threadID}#p#{id}"
link.nextSibling.href = "res/#{threadID}#q#{id}"
nodes.push reply
@@ -1211,7 +1211,7 @@ Keybinds =
qr: (thread, quote) ->
if quote
- QR.quote.call $ '.postNum > a[title="Quote this post"]', $('.post.highlight', thread) or thread
+ QR.quote.call $ 'a[title="Quote this post"]', $('.post.highlight', thread) or thread
else
QR.open()
$('textarea', QR.el).focus()
@@ -1332,7 +1332,7 @@ QR =
$.on d, 'dragstart dragend', QR.drag
node: (post) ->
- $.on $('.postNum > a[title="Quote this post"]', post.el), 'click', QR.quote
+ $.on $('a[title="Quote this post"]', post.el), 'click', QR.quote
open: ->
if QR.el
@@ -2753,7 +2753,7 @@ Get =
href = quote.getAttribute 'href'
continue if href[0] is '/' # Cross-board quote, or board link
quote.href = "/#{board}/res/#{href}" # Fix pathnames
- link = $ '.postNum > a[title="Highlight this post"]', pc
+ link = $ 'a[title="Highlight this post"]', pc
link.href = "/#{board}/res/#{threadID}#p#{postID}"
link.nextSibling.href = "/#{board}/res/#{threadID}#q#{postID}"
@@ -2775,7 +2775,7 @@ Get =
piM = $.el 'div',
id: "pim#{postID}"
className: 'postInfoM mobile'
- innerHTML: "
#{data.fourchan_date}
No.#{postID}"
+ innerHTML: "
#{data.fourchan_date}
No.#{postID}"
$('.name', piM).textContent = name
$('.subject', piM).textContent = subject
br = $ 'br', piM
@@ -3204,7 +3204,7 @@ Quotify =
m[1]
else
# Get the post's board, whether it's inlined or not.
- $('.postNum > a[title="Highlight this post"]', post.el).pathname.split('/')[1]
+ $('a[title="Highlight this post"]', post.el).pathname.split('/')[1]
nodes.push a = $.el 'a',
# \u00A0 is nbsp
@@ -3283,7 +3283,7 @@ DeleteLink =
menu = $.id 'menu'
id = menu.dataset.id
- board = $('.postNum > a[title="Highlight this post"]',
+ board = $('a[title="Highlight this post"]',
$.id menu.dataset.rootid).pathname.split('/')[1]
self = @
@@ -3326,7 +3326,7 @@ ReportLink =
open: (post) ->
post.isArchived is false
report: ->
- a = $ '.postNum > a[title="Highlight this post"]', $.id @parentNode.dataset.rootid
+ a = $ 'a[title="Highlight this post"]', $.id @parentNode.dataset.rootid
url = "//sys.4chan.org/#{a.pathname.split('/')[1]}/imgboard.php?mode=report&no=#{@parentNode.dataset.id}"
id = Date.now()
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=200"
@@ -3362,7 +3362,7 @@ ArchiveLink =
Menu.addEntry
el: a
open: (post) ->
- path = $('.postNum > a[title="Highlight this post"]', post.el).pathname.split '/'
+ path = $('a[title="Highlight this post"]', post.el).pathname.split '/'
if (href = Redirect.thread path[1], path[3], post.ID) is "//boards.4chan.org/#{path[1]}/"
return false
a.href = href