Benjol / SE-AutoReviewComments

AutoReviewComments - Pro-forma comments for SE
http://stackapps.com/q/2116
98 stars 39 forks source link

Autocomments throws error in SO Teams #150

Closed surajrao closed 6 years ago

surajrao commented 6 years ago

Below is the error in the console when you click on edit on a post in any team.

jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: #post-editor-/c/charcoal55
    at Function.fa.error (jquery.min.js:2)
    at fa.tokenize (jquery.min.js:2)
    at fa.select (jquery.min.js:2)
    at Function.fa [as find] (jquery.min.js:2)
    at n.fn.init.find (jquery.min.js:2)
    at new n.fn.init (jquery.min.js:2)
    at n (jquery.min.js:2)
    at findEditSummaryElements (<anonymous>:709:26)
    at _internalInjector (<anonymous>:664:30)
    at HTMLAnchorElement.<anonymous> (<anonymous>:681:9)

This was in teams beta.

It needs to a tweak to avoid parsing -/c/<team> in the post-editor-177 id.

 <div id="post-editor-177" class="post-editor js-post-editor">

Posting because of impending changes in UI. Refer to meta post here. Possible solution is to disable in teams (if no plan to support) or rectify the userscript to get id.

oliversalzburg commented 6 years ago

I'm assuming this piece of code is the culprit.

@surajrao Can you provide a sample URL for testing? I'm not in Teams Beta.

surajrao commented 6 years ago

https://stackoverflow.com/c/charcoal/posts/197/edit here is sample teams url . Thanks

oliversalzburg commented 6 years ago

@surajrao Can you verify if e2ee7aae33a89dbfa2a7e5c5e3939b0e7bba41af fixes this?

surajrao commented 6 years ago

@oliversalzburg yeah. That works!

oliversalzburg commented 6 years ago

@surajrao Awesome, thanks. I will merge this later today and build a fresh release.