OLD | NEW |
1 <!-- | 1 /* |
2 * Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this |
3 * source code is governed by a BSD-style license that can be found in the | 3 * source code is governed by a BSD-style license that can be found in the |
4 * LICENSE file. | 4 * LICENSE file. |
5 --> | 5 */ |
6 <html> | |
7 <head> | |
8 <style> | |
9 body { | |
10 overflow-x: hidden; | |
11 } | |
12 | 6 |
13 .heading { | |
14 font-family: Helvetica, Arial; | |
15 font-size: small; | |
16 font-weight: bold; | |
17 margin-left: 2px; | |
18 } | |
19 | |
20 .feedList { | |
21 font-family: Helvetica, Arial; | |
22 font-size: small; | |
23 vertical-align: bottom; | |
24 } | |
25 </style> | |
26 <script> | |
27 function feedLink(url) { | 7 function feedLink(url) { |
28 var feed_link = document.createElement('a'); | 8 var feed_link = document.createElement('a'); |
29 feed_link.href = url; | 9 feed_link.href = url; |
30 feed_link.addEventListener("click", onClick); | 10 feed_link.addEventListener("click", onClick); |
31 return feed_link; | 11 return feed_link; |
32 } | 12 } |
33 | 13 |
34 function main() { | 14 function main() { |
35 chrome.tabs.getSelected(null, function(tab) { | 15 chrome.tabs.getSelected(null, function(tab) { |
36 var feeds = chrome.extension.getBackgroundPage().feedData[tab.id]; | 16 var feeds = chrome.extension.getBackgroundPage().feedData[tab.id]; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 if (window.localStorage && window.localStorage.showPreviewPage == "No") { | 66 if (window.localStorage && window.localStorage.showPreviewPage == "No") { |
87 // Skip the preview. | 67 // Skip the preview. |
88 url = window.localStorage.defaultReader.replace("%s", escape(feed_url)); | 68 url = window.localStorage.defaultReader.replace("%s", escape(feed_url)); |
89 } else { | 69 } else { |
90 // Show the preview page. | 70 // Show the preview page. |
91 url = "subscribe.html?" + encodeURIComponent(feed_url); | 71 url = "subscribe.html?" + encodeURIComponent(feed_url); |
92 } | 72 } |
93 chrome.tabs.create({ url: url }); | 73 chrome.tabs.create({ url: url }); |
94 window.close(); | 74 window.close(); |
95 } | 75 } |
96 </script> | 76 |
97 </head> | 77 // Init on DOM ready. |
98 <body onload="javascript:main()"> | 78 document.addEventListener('DOMContentLoaded', main); |
99 <div id="content"> | |
100 <span id="heading" class="heading">Loading...</span> | |
101 </div> | |
102 </body> | |
103 </html> | |
OLD | NEW |