Different jquery Libaries = Hard to track down

This MOD is called “YouTube banner modal”
https://anymod.com/mod/youtube-banner-modal-lllamb

It USES this JQUERY SLIM VERSION
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js

The external script asset can completely destroy a lot of JQuery-functions, IF another (full) Jquery Version is already loaded on the same page.

THUS: I suggest anyMod might print a warning to the console, IF TWO or more Jquery-Libaries are found loaded on the same page.

This error is hard to track down.

The error can be especially confusing and unexpected.

The warning-message printed to the console would be most helpful if if stated the whereabouts of all Jquery Libaries at play.

The warning message may let the admin know which MODs are loading a second jquery asset .

Thank you for the suggestion! We are looking at ways to avoid this problem altogether, but in the meantime we will add a console warning to our roadmap :+1:

The jquery libary is loaded twice on this page :
https://novaconsonanza.de/orchestermitglieder.min.html
the versions are
1: Head Section
/! jQuery v1.12.4 | © jQuery Foundation | jquery.org/license /
2: and FROM alnkmd

/*! jQuery v3.3.1 | © JS Foundation and other contributors | jquery.org/license */

A warning-message printed to the console would be most helpful.

Does this only happe due to the entirely different versions of the two Jquery - Libaries?

see screenshot:

Yes, this is usually because 2 mods are using 2 different versions of jQuery. You can replace the version in one of the mods and usually everything will work well. We recommend using the newer version whenever possible, but every now and then the 3rd party libraries used in mods require an older version.

Okay, Understood, great.

I will act accordingly. Thank you!

To ease the identification of such an error , A Warning printed to the Console might be helpful.

As far as I am concerned, I am now aware enough to identify such an issue quickly enough, even without a hint in the console

1 Like