trying to configure bitcoin on extension

21 views
Skip to first unread message

Adolfo Rodriguez

unread,
May 6, 2013, 2:54:14 PM5/6/13
to chromium-...@chromium.org
Hi guys,

I am trying to configure a demo bitcoin payment button in an extension.

My current permissions are:

  "permissions": [
    "tabs",
    "<all_urls>"
  ],

I am trying to configure it in a popup options.html opened from background.js by

chrome.tabs.create({url: 'options.html'});

I just added the demo code here, i.e. this sample code to the options.html:

<a class="coinbase-button" data-code="4d4b84bbad4508b64b61d372ea394dad" href="https://coinbase.com/checkouts/4d4b84bbad4508b64b61d372ea394dad">Pay With Bitcoin</a>
<script src="https://coinbase.com/assets/button.js" type="text/javascript"></script>

and despite it works and the payment page is opened, button styles are not loaded and I see a flat HTML link instead.

Does anyone know what permission should be added to allow styles to be loaded?

Thanks

Scott Fujan

unread,
May 6, 2013, 3:12:59 PM5/6/13
to Adolfo Rodriguez, Chromium-extensions
http://developer.chrome.com/extensions/contentSecurityPolicy.html

Specifically this default behavior is what causes this: "script-src 'self';"

You shouldn't run an external script internally like that though. It is a huge security hole. Coinbase would have full control of your extension. I suggest just styling the button yourself.


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en-US.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.
 
 

Adolfo Rodriguez

unread,
May 6, 2013, 3:19:01 PM5/6/13
to chromium-...@chromium.org, Adolfo Rodriguez
yes, I realize now. You area absolutelly correct.

Thanks
Reply all
Reply to author
Forward
0 new messages