title: Creating a javascript widget for other sites
body: <p>I am looking to create a javascript "widget" that can be hosted on other sites. For example. I want to host the javascript code on my site:</p>
  
  <p><code>http://scripts.mysite.com/mywidget.js</code></p>
  
  <p>(Think of it like Google Analytics).</p>
  
  <p>Basically I want to distribute data via this javascript. But what I am unsure of is:</p>
  
  <ul>
  <li>Are the rules different for development when creating a javascript for another site (cross site)</li>
  <li>Are there any websites that explain these differences?</li>
  </ul>