Chromium Code Reviews| Index: chrome/test/data/extensions/subscribe_page_action/subscribe.js |
| =================================================================== |
| --- chrome/test/data/extensions/subscribe_page_action/subscribe.js (revision 137495) |
| +++ chrome/test/data/extensions/subscribe_page_action/subscribe.js (working copy) |
| @@ -144,9 +144,11 @@ |
| } |
| function createFrame(frame_id, html) { |
| + var csp = '<meta http-equiv="content-security-policy" ' + |
| + 'value="script-src \'self\';">'; |
|
abarth-chromium
2012/05/17 17:02:34
Can you add an object-src directive here? Assumin
Finnur
2012/05/17 19:20:37
Added. I'm not using any plugins (that I know of)
|
| frame = document.createElement('iframe'); |
| frame.id = frame_id; |
| - frame.src = "data:text/html;charset=utf-8,<html>" + styleSheet + html + |
| + frame.src = "data:text/html;charset=utf-8,<html>" + csp + styleSheet + html + |
| "</html>"; |
| frame.scrolling = "auto"; |
| frame.frameBorder = "0"; |
| @@ -222,3 +224,20 @@ |
| if (readerDropdown.selectedIndex == readerDropdown.length - 1) |
| window.location = "options.html"; |
| } |
| + |
| +document.addEventListener('DOMContentLoaded', function () { |
| + document.title = |
| + chrome.i18n.getMessage("rss_subscription_default_title"); |
| + i18nReplace('rss_subscription_subscribe_using'); |
| + i18nReplace('rss_subscription_subscribe_button'); |
| + i18nReplace('rss_subscription_always_use'); |
| + i18nReplace('rss_subscription_feed_preview'); |
| + i18nReplaceImpl('feedUrl', 'rss_subscription_feed_link', ''); |
| + |
| + var dropdown = document.getElementById('readerDropdown'); |
| + dropdown.addEventListener('change', onSelectChanged); |
| + var button = document.getElementById('rss_subscription_subscribe_button'); |
| + button.addEventListener('click', navigate); |
| + |
| + main(); |
| +}); |