diff --git a/4chan_x.user.js b/4chan_x.user.js index c722267ae..37afb88a8 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -621,7 +621,7 @@ this.ID = +root.id.slice(1); this.hr = root.nextElementSibling; this.posts = {}; - g.threads[this.ID] = board.threads[this.ID] = this; + g.threads["" + board.ID + "." + this.ID] = board.threads[this.ID] = this; } return Thread; @@ -636,7 +636,7 @@ this.board = board; this.ID = +root.id.slice(2); this.el = $('.post', root); - g.posts[this.ID] = thread.posts[this.ID] = board.posts[this.ID] = this; + g.posts["" + board.ID + "." + this.ID] = thread.posts[this.ID] = board.posts[this.ID] = this; } return Post; diff --git a/script.coffee b/script.coffee index 94aa92cd8..8cae390fa 100644 --- a/script.coffee +++ b/script.coffee @@ -485,14 +485,14 @@ class Thread @hr = root.nextElementSibling @posts = {} - g.threads[@ID] = board.threads[@ID] = @ + g.threads["#{board.ID}.#{@ID}"] = board.threads[@ID] = @ class Post constructor: (@root, @thread, @board) -> @ID = +root.id[2..] @el = $ '.post', root - g.posts[@ID] = thread.posts[@ID] = board.posts[@ID] = @ + g.posts["#{board.ID}.#{@ID}"] = thread.posts[@ID] = board.posts[@ID] = @ Main = init: -> @@ -528,13 +528,13 @@ Main = if $.hasClass child, 'postContainer' new Post child, thread, g.BOARD $.log g + addStyle: -> $.off d, 'DOMNodeInserted', Main.addStyle if d.head $.addStyle Main.css else $.on d, 'DOMNodeInserted', Main.addStyle - css: ' .move { cursor: move;