Javascript in .js file, detecting presence of link in parent html
<p>I am making some link bait which is basically an externally hosted .js file people can place on their websites. I would like an accompanying html link to accompany the widget however I would like the widget to detect if the link is present. i.e.</p>

<pre><code>&amp;lt;script src="http://domain.com/foo.js"&gt;&amp;lt;/script&gt;&lt;br /&gt;
by &amp;lt;a href="http://domain.com"&gt;My Site&amp;lt;/a&gt; &amp;lt;-- detect this is here
</code></pre>

<p>The issue is that i dont know on which sites my widget will be placed.</p>

<p>any ideas?</p>
