Record replies made via AJAX on Tinyboard as yours.
This commit is contained in:
parent
fbb54b58f7
commit
99a653f7f2
14
src/Miscellaneous/Tinyboard.coffee
Normal file
14
src/Miscellaneous/Tinyboard.coffee
Normal 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}
|
||||
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user