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]
|
switch pathname[2]
|
||||||
when 'res', 'thread'
|
when 'res', 'thread'
|
||||||
'thread'
|
'thread'
|
||||||
when 'catalog'
|
when 'catalog', 'archive', 'post'
|
||||||
'catalog'
|
pathname[2]
|
||||||
when 'archive'
|
|
||||||
'archive'
|
|
||||||
else
|
else
|
||||||
'index'
|
'index'
|
||||||
return if g.VIEW is 'catalog' and g.BOARD.ID is 'f'
|
return if g.VIEW is 'catalog' and g.BOARD.ID is 'f'
|
||||||
@ -56,6 +54,7 @@ Main =
|
|||||||
when 'a.4cdn.org'
|
when 'a.4cdn.org'
|
||||||
return
|
return
|
||||||
when 'sys.4chan.org'
|
when 'sys.4chan.org'
|
||||||
|
PostSuccessful.init() if g.VIEW is 'post'
|
||||||
return
|
return
|
||||||
when 'i.4cdn.org'
|
when 'i.4cdn.org'
|
||||||
$.asap (-> d.readyState isnt 'loading'), ->
|
$.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