I'm not wel versed in javascript. Consider me a newbie. But I've gobbled some stuff together to make a small addition to a website I often use.
Now this works on the "original" page, but a few related pages also load my extension (where it too would be useful), but now some stuff on the page stops working.
The page has an "edit message" box, where you can select a piece of text and then hit the "bold" button and it will do whatever it neccessary to make that text bold. I just tested that right here on THIS edit window and it's the same here (that is: select then hit button).
Anyway, my userscript seems syntactically correct, but somehow influences the stuff that makes the editor work.
min?g=forum.post-edi…8K6KitIVTFiUWEa0:21 Uncaught TypeError: $(...).on is not a function
at HTMLDocument.<anonymous> (min?g=forum.post-edi…8K6KitIVTFiUWEa0:21)
at Object.resolveWith (userscript.html?name…a981-daf70ed9950d:3)
at Function.ready (userscript.html?name…a981-daf70ed9950d:3)
at HTMLDocument.C (userscript.html?name…a981-daf70ed9950d:3)
That seems to be the error that I get.
My script does not use the word "on".
While investigating this to make this question it seems this is due to jquery clashes. My script does
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js#sha384-r2H3/Z2KzIwcAodo3prLbMqa/s1cyh+kByvW1+xEdAt+G0icddK5/pb+yeSf5SjC
while the page in question has:
<script src="/min?g=jquery.a-tools-js&rRDA9gx3IFij41fg0E0qISYO668" defer></script>
<script src="/min?g=jquery.modaal-js&s6guStp3uQpv-PeeQdKXO4JY4_k" defer></script>
Their version does not have $(), while the google-api version does not have ().on Or something like that. How can I resolve this?