vihanb / PPCG-Design

A redesign of the PPCG website
codegolf.stackexchange.com
35 stars 14 forks source link

Userscript is consistently causing SE's JS to not load properly #124

Closed Mego closed 7 years ago

Mego commented 7 years ago

It takes 2-3 refreshes in order to comment, vote, or do anything else that relies on SE's JS code. This issue does not exist without the userscript.

JJ-Atkinson commented 7 years ago

I don't see this happening... Did it start with a specific update? Which browser are you using?

somebody1234 commented 7 years ago

It's been happening to me for a few months as well, using Chromium 58 at the moment

RikerW commented 7 years ago

Same here, but it doesn't fix itself when I turn off the userscript.

vihanb commented 7 years ago

Must be either innerhtml bork or tamprermonkey bork

somebody1234 commented 7 years ago

:| Who is using innerHTML

somebody1234 commented 7 years ago

@RikerW Maybe it's caused by SOX then? (if you have it)

vihanb commented 7 years ago

we're using document.head.innerHTML +=, that will invalidate the existing DOM head, so the scripts might not get correctly reloaded

Mego commented 7 years ago

This has been happening to me for months, but it only got consistently bad within the last few weeks. I have no issues when the userscript is turned off. It happens on both lastest chrome and latest Firefox for me.

On Wed, Jun 14, 2017 at 18:15 Vihan notifications@github.com wrote:

we're using document.head.innerHTML +=, that will invalidate the existing DOM head, so the scripts might not get correctly reloaded

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vihanb/PPCG-Design/issues/124#issuecomment-308584425, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0FEIdR7C1g9w2nw3ILnL57RQY5Ksdkks5sEGmZgaJpZM4N5ex3 .

-- Sent from Gmail Mobile

somebody1234 commented 7 years ago

@vihanb Oh no who did this I will report to w3c bad practice department :P

vihanb commented 7 years ago

ok with the removing of the innerHTMLs seems to work :D

somebody1234 commented 7 years ago

@Mego Can you try now?

Mego commented 7 years ago

@somebody1234 The issue doesn't seem to be happening anymore. Thanks!

somebody1234 commented 7 years ago

@Mego I'm not exactly sure about that, I think it happened to me a few times after I fixed it (although it might be another userscript) so you might want to watch out just in case it happens again