Note that there are some explanatory texts on larger screens.

plurals
  1. POPreventing malicious overwrite of JQuery
    primarykey
    data
    text
    <p>Long story short:</p> <p>We've had errors being logged concerning a JQuery/JQueryUI based system for some time. At it's core we're doing a pretty basic click link -> JQuery AJAX GET -> Open JQueryUI modal pattern.</p> <p>The error we were getting appeared simple - "Object doesn't support property or method 'dialog'" - leading us to believe there was an error with JQueryUI. After expending a lot of time ruling out browser incompatibilities, bad code on JQuery's end, bad code on our end, angry code gods... we caught a lucky break. A 100% repro on one of the machines in the office.</p> <p>Turns out the thing was riddled with adware - specifically [an older version of] easyinline - <a href="http://www.easyinline.com" rel="nofollow">http://www.easyinline.com</a>. When the user clicked any link a cascade of javascript files would be loaded, including reloading JQuery from Google's CDN.</p> <p>For most links this isn't really a problem - they take you off the page anyway and everything reloads. But for our modals it meant that every modal link would stamp over our JQuery at the point the request was sent, resulting in the response trying to make use of the 'new' $ which would now be missing JQueryUI and any other plugins.</p> <p>Initially we thought about making another global var ($$ or something) for 'our' JQuery and explicitly using that in our code instead of just $. The issue with that is that we were using a few other 3rd party tools which rely on $ and the adware-loaded $ is a different (older) version. So it's important that we preserve $ correctly.</p> <p>Any ideas? I'm aware of JQuery's noConflict() method but after a cursory glance don't think it fits the bill.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload