Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2085)

Unified Diff: chrome/test/data/extensions/subscribe_page_action/subscribe.js

Issue 10407017: Convert RSS extension to use manifest version 2 (with CSP protection). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/subscribe_page_action/subscribe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+});
« no previous file with comments | « chrome/test/data/extensions/subscribe_page_action/subscribe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698