Fix posts from original post form not being marked as yours.
This commit is contained in:
parent
ed0edd760a
commit
27ae66feea
@ -14,10 +14,8 @@ Main =
|
||||
switch pathname[2]
|
||||
when 'res', 'thread'
|
||||
'thread'
|
||||
when 'catalog'
|
||||
'catalog'
|
||||
when 'archive'
|
||||
'archive'
|
||||
when 'catalog', 'archive', 'post'
|
||||
pathname[2]
|
||||
else
|
||||
'index'
|
||||
return if g.VIEW is 'catalog' and g.BOARD.ID is 'f'
|
||||
@ -56,6 +54,7 @@ Main =
|
||||
when 'a.4cdn.org'
|
||||
return
|
||||
when 'sys.4chan.org'
|
||||
PostSuccessful.init() if g.VIEW is 'post'
|
||||
return
|
||||
when 'i.4cdn.org'
|
||||
$.asap (-> d.readyState isnt 'loading'), ->
|
||||
|
||||
17
src/Posting/PostSuccessful.coffee
Normal file
17
src/Posting/PostSuccessful.coffee
Normal file
@ -0,0 +1,17 @@
|
||||
PostSuccessful =
|
||||
init: ->
|
||||
$.ready @ready
|
||||
|
||||
ready: ->
|
||||
return unless d.title is 'Post successful!'
|
||||
|
||||
[_, threadID, postID] = $('h1').nextSibling.textContent.match /thread:(\d+),no:(\d+)/
|
||||
postID = +postID
|
||||
threadID = +threadID or postID
|
||||
|
||||
db = new DataBoard 'yourPosts'
|
||||
db.set
|
||||
boardID: g.BOARD.ID
|
||||
threadID: threadID
|
||||
postID: postID
|
||||
val: true
|
||||
Loading…
x
Reference in New Issue
Block a user