reddit-moderator-toolbox-legacy icon indicating copy to clipboard operation
reddit-moderator-toolbox-legacy copied to clipboard

New modmail: automatically expand the entire conversation on opening.

Open creesch opened this issue 9 years ago • 1 comments

Currently longer conversation open in a collapsed mode where the middle part of the conversation can be expanded.

I personally find myself expanding them basically 99% of the time anyway so we might as well let toolbox do it.

creesch avatar Nov 16 '16 12:11 creesch

document.body.addEventListener('click', function (event) {
  if (event.target.matches('.ThreadPreviewViewer__thread *')) {
    setTimeout(function () {
      document.querySelector('.Thread__grouped').click()
    }, 1000)
  }
})

This console script works as a proof of concept, but it's probably better not to rely on an arbitrary timeout since we're waiting for the page to load. I have no idea what I'm doing with React so idk the best way to tackle that.

eritbh avatar Jun 22 '17 20:06 eritbh