Record replies made via AJAX on Tinyboard as yours.

This commit is contained in:
ccd0 2018-12-06 21:16:37 -08:00
parent fbb54b58f7
commit 99a653f7f2
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
Tinyboard =
init: ->
return unless Site.software is 'tinyboard'
if g.VIEW is 'thread'
Main.ready ->
$.global ->
{boardID, threadID} = document.currentScript.dataset
threadID = +threadID
window.$(document).on 'new_post', (e, post) ->
postID = +post.id.match(/\d*$/)[0]
detail = {boardID, threadID, postID}
event = new CustomEvent 'QRPostSuccessful', {bubbles: true, detail: detail}
document.dispatchEvent event
, {boardID: g.BOARD.ID, threadID: g.THREADID}

View File

@ -478,6 +478,7 @@ Main =
['Disable Autoplay', AntiAutoplay]
['Announcement Hiding', PSAHiding]
['Fourchan thingies', Fourchan]
['Tinyboard Glue', Tinyboard]
['Color User IDs', IDColor]
['Highlight by User ID', IDHighlight]
['Count Posts by ID', IDPostCount]