Detect ?=randomString in URL and append to all external links with jQuery
<p>I'm trying to detect ?=randomString (e.g: ?=s123ver which is dynamically generated server side) in the URL and append everything after the ?= to all external links in the page with the class external.  </p>

<p>This is what I've got to append the string, I'm just not sure about how to go around reading the URL and putting it into the _randomString variable, as the ?= string length can vary. </p>

<p>I have no access to server side. </p>

<pre><code>var _href = $("a.external").attr("href");
var _randomString = ???
$("a.external").attr("href", _href + _randomString);
</code></pre>
