title: Coinbase custom button in Chrome Extension
body: <p>I'm trying to add a custom coinbase payment button in a google chrome extension. </p>
  
  <p>I've gotten it to work in the jsfiddle: <a href="http://jsfiddle.net/hqhLV/" rel="nofollow">http://jsfiddle.net/hqhLV/</a></p>
  
  <pre><code>$(document).ready(function () {
  
  code = "65a580d7449cc35869c9bd0d49cf77bd";
  
  function get_button_html(code) {
      var button_html = "&lt;div class='coinbase-button' data-code='65a580d7449cc35869c9bd0d49cf77bd' data-button-style='none'&gt;&lt;/div&gt;";
  
      return button_html;
  }
  
  function loadButton(code) {
      $('body').after("&lt;a href='' class='my-custom-link'&gt;Show Me The Modal!&lt;/a&gt;", get_button_html(code));
  };
  
  loadButton(code);
  $.getScript("https://coinbase.com/assets/button.js");
  
  $('.my-custom-link').click(function () {
      console.log('coinbase_show_modal');
      $(document).trigger('coinbase_show_modal', '65a580d7449cc35869c9bd0d49cf77bd');
      return false;
  });
  
  $(document).on('coinbase_payment_complete', function (event, code) {
      console.log("Payment completed for button " + code);
      window.location = "/confirmation.html";
  });
  </code></pre>
  
  <p>});</p>
  
  <p>However, copying the code as a content script file in the extension. Any idea what might be the cause?</p>