title: Using google translate api in userscript
body: <p>I am making a userscript for facebook that would help translate text using Google Translate Api. Script is  injecting html and css content successfully into facebook. </p>
  
  <p>Problem is with Google Translate Api. I am injecting a script tag </p>
  
  <pre><code>var s = document.createElement('script');
  s.type="text/javascript";
  s.src='https://www.google.com/jsapi?key=AIzaSyD24A-czAdTj8pPc5ugo0bYiPRx8Rc2pXo';
  document.body.appendChild(s);
  </code></pre>
  
  <p>First this script is loading the url 2 or 3 times.</p>
  
  <p>To actually use the Language Api I am injecting another script tag</p>
  
  <pre><code>var ldfun = document.createElement('script');
  ldfun.setAttribute('type', 'application/javascript');
  ldfun.textContent= "google.load('language','1');";
  document.body.appendChild(ldfun);
  </code></pre>
  
  <p>this script is not running and sometimes it runs then the page naviages away.</p>
  
  <p>Help please</p>