Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stackexchange.ready is not a function #145

Open
surajrao opened this issue Jan 13, 2018 · 6 comments
Open

Stackexchange.ready is not a function #145

surajrao opened this issue Jan 13, 2018 · 6 comments

Comments

@surajrao
Copy link

surajrao commented Jan 13, 2018

Go to https://stackexchange.com

Following error in the console:

Uncaught TypeError: StackExchange.ready is not a function
    at <anonymous>:2:17
    at <anonymous>:890:3
    at with_jquery (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=3398c345-6822-4d11-acf2-55d09dbbbd2a:32)
    at Window.eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=3398c345-6822-4d11-acf2-55d09dbbbd2a:35)
    at <anonymous>:2:120
    at eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=3398c345-6822-4d11-acf2-55d09dbbbd2a:2)
    at eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=3398c345-6822-4d11-acf2-55d09dbbbd2a:3)
    at Object.eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=3398c345-6822-4d11-acf2-55d09dbbbd2a:926)
    at eval (chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/userscript.html?id=3398c345-6822-4d11-acf2-55d09dbbbd2a:928)
    at eval (<anonymous>)

Stackexchange.ready is not a function

Regex probably needs a tweak:

// @include /^https?:\/\/(.*\.)?stackexchange\.com/.*$/
to disable in the main site as I do not see a use case there

@surajrao
Copy link
Author

surajrao commented Feb 9, 2018

Workaround is change the include to // @include /^https?:\/\/(.*\.)stackexchange\.com/.*$/

@oliversalzburg
Copy link
Collaborator

@surajrao Would you suggest we add that to the script? Do you want to create a pull request maybe?

@surajrao
Copy link
Author

Its working without a glitch for me.. I could do a pull request. But do I need to just make changes in dist / folder or the build xml file ?

@oliversalzburg
Copy link
Collaborator

Heh, good point. I forgot about how these URLs are generated. Probably a bit more complicated than I hoped.

@oliversalzburg
Copy link
Collaborator

This is also related to #133 and #138 as the latter only fixed the dist files.

@oliversalzburg
Copy link
Collaborator

The userscript already uses // @include /^https?:\/\/(.*\.)?stackexchange\.com/.*$/. So that can't be the fix :D

I guess it would need to be // @include /^https?:\/\/(.*\.)stackexchange\.com/.*$/ (? removed). But that require a lot of changes in the build system.

How about we just add // @exclude *://stackexchange.com/*? This seems to resolve it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants