Skip to main content
3 of 4
added 128 characters in body
Tamara Wijsman
  • 57.7k
  • 24
  • 45

Found the relevant code:

var c=this.jDiv.find(".comment-form");

c.find(".discussion-info").length ||
  ($("<div style='margin:12px 0 3px; font-weight:bold' class='discussion-info'>Please avoid extended  discussions in comments. Would you like to <a href='#'>automatically move this discussion to chat?</a></div>")
  .find("a").click(function(a){
    $(this).unbind("click");
    a.preventDefault();
    b.ajax({url:"/posts/"+b.postId+"/move-discussion-to-chat", data:{fkey:StackExchange.options.user.fkey},type:"POST"},"when trying to move the discussion to chat",c).done(function(a){a.success?window.location.href=a.message:StackExchange.helpers.showErrorPopup(c,a.message)})}).end().prependTo(c),a.remove())}}});

So, we can see that it is doing a POST to /posts/{postId}/move-discussion-to-chat and StackExchange.options.user.fkey is passed along; this would require an user script to replicate. Simply because you can only make GET requests through your address bar...

Here are observations when reproducing this:

  1. It does not work on Meta.SU, simply because there is no chat for Meta.SU.

  2. This does not work on posts you are not involved in, luckily...

Tamara Wijsman
  • 57.7k
  • 24
  • 45