Userscript that applies to all pages causes issues in StackExchange

49 views Asked by At

Possibly related: Google comes up blank.

My userscript here seems to cause issues when I use it in Firefox.

Google searches come up blank, though I can inspect and see the code.

However, the main thrust of this issue (since I can band-aid the previous one by excluding certain sites) is that the editor tools on StackExchange sites disappear, as does the tags dropdown. Here is a screenshot of what I'm describing.

This is what I mean

It's probably going to be a straightforward fix that I've missed because I don't have a scripting background, but I'm not sure where to look to fix this.

1

There are 1 answers

0
Maxime Peloquin On BEST ANSWER

Your jQuery version is in conflict with the Stackoverflow's jQuery version.

Basically, SO is using an older jQuery version to support older browsers. They use in their code some now deprecated jQuery function and the browser uses your jQuery version to try to run these old functions but they are not found.

This is how you can make sure the versions don't get in conflict :

var myJq = jQuery.noConflict(true); 
(function ($) {
    $(document).ready(function () {
        replaceCitations();
    });
}(myJq));

Your code also seem to be duplicating some html content, but I don't think I can help you with the regex. You can try to open a new question for that.