vyznev / soup

Stack Overflow Unofficial Patch
27 stars 6 forks source link

SOUP prevents adding comments to Teams posts #36

Closed cellio closed 6 years ago

cellio commented 6 years ago

With SOUP enabled, I am unable to comment on posts in SO Teams. I get the following console errors:

TypeError: str is undefined[Learn More] 160:505:4

Error: Syntax error, unrecognized expression: #post-editor-/c/moderators160 jquery.min.js:2:12733

The format of a Team URL is https://stackoverflow.com/c/(team name)/questions/### -- the "/c" is the special marker here.

I've locally modified the script to operate on stackoverflow.com/questions (as opposed to ) to bypass the problem -- not ideal, but I don't know how to do "@match all except* this pattern".

vyznev commented 6 years ago

That's... annoying. And I can't test it myself, since I don't have access to Teams. :(

In the mean time, adding

// @exclude https://stackoverflow.com/c/*

to the userscript header should prevent SOUP from running on Teams pages. Could you please test that and let me know if it helps? If it does, I'll push a new SOUP release with that header added.

Oh, and many thanks for the report!

vyznev commented 6 years ago

BTW, looking more closely at the error message, I'm pretty sure the culprit is the mso338932 fix, which for some reason is receiving a really weird postfix parameter from the Markdown editor. I have no idea how or why that's happening, but I'll add some validation code to guard against similar issues in the future.

cellio commented 6 years ago

Adding the @exclude line fixed the problem for me. Thanks!

I'm happy to test things for you. You should assume that I know almost nothing about browser web-developer tools, though. (So, e.g., happy to get you a stack trace -- if you tell me how. :-) )

vyznev commented 6 years ago

This should now be fixed in SOUP v1.52.1, just pushed to the master branch (and cherry-picked to devel as v1.53.2). I'll update the Firefox and Chrome extensions later today. Thanks!