Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add missing Reply buttons...
- $('div[id^=forum-post-]').each(function () {
- if ($('button[data-modal-template^=SC_Forms_Forum_]', this).length) return
- heart = $('button[data-forum-post-heart]', this)
- if (heart.length) {
- threadid = $('button[data-thread-subscribe]').attr('data-thread-subscribe')
- parentid = $('a', heart.parent().prev()).attr('href').match(/\d+$/)
- who = $('a[data-usercard]', this).attr('data-usercard')
- heart.parent().append(' <button type="button" data-toggle="tooltip" class="btn btn-primary mb-1 " '
- + 'data-modal-size="large" data-title="Post to this Thread" data-modal-template="SC_Forms_Forum_postNew" '
- + 'data-param=\'{"threadid":"' + threadid + '","parentpost":"' + parentid + '","name":"' + who + '"}\'>'
- + '<i class="fas fa-reply"></i> Reply</button>')
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment