How to change jQuery default context?
<p>I loaded jQuery on a Firefox addon, which causes it to load using XUL's <code>window</code>.</p>

<p>I want to change the default context so it will use the correct <code>window</code> object.</p>

<p>The classic example I always see is:</p>

<pre><code>var $ = function(selector,context){
   return new  jQuery.fn.init(selector,context|| correctWindow );
};
$.fn = $.prototype = jQuery.fn;
</code></pre>

<p>But doing it I kill a lot of functions, like <code>.ajax</code>, <code>.browser</code>, ... I need these methods.</p>

<p><a href="https://addons.mozilla.org/en-US/firefox/" rel="nofollow">AMO</a> won't let me create an wrapper to <code>jQuery</code> to send the correct <code>window</code> object.</p>

<p>So my only option is to somehow change jQuery's default context without changing its source code.</p>

<p>What options do I have?</p>
