| OLD | NEW | 
|    1 <!doctype html> |    1 <!DOCTYPE html> | 
|    2 <html> |    2 <html> | 
|    3 <head> |    3 <head> | 
|    4 <style> |    4 <style> | 
|    5 body { |    5 body { | 
|    6   font-family: helvetica, arial, sans-serif; |    6   font-family: helvetica, arial, sans-serif; | 
|    7   font-size: 12px; |    7   font-size: 12px; | 
|    8   overflow: hidden; |    8   overflow: hidden; | 
|    9 } |    9 } | 
|   10  |   10  | 
|   11 a { |   11 a { | 
|   12   color:#0000CC; |   12   color:#0000CC; | 
|   13   text-decoration: underline; |   13   text-decoration: underline; | 
|   14   cursor: pointer; |   14   cursor: pointer; | 
|   15 } |   15 } | 
|   16  |   16  | 
|   17 .open_box { |   17 .open_box { | 
|   18   display:block; |   18   display: block; | 
|   19   overflow:hidden; |   19   overflow: hidden; | 
|   20   margin-right:4px; |   20   margin-right: 4px; | 
|   21   margin-top:2px; |   21   margin-top: 2px; | 
|   22   height:12px; |   22   height: 12px; | 
|   23   width:12px; |   23   width: 12px; | 
|   24   float: left; |   24   float: left; | 
|   25   clear: left; |   25   clear: left; | 
|   26   background-image:url(sprite_arrows.gif); |   26   background-image: url(sprite_arrows.gif); | 
|   27   background-position:0px -24px; |   27   background-position: 0px -24px; | 
|   28   cursor: pointer; |   28   cursor: pointer; | 
|   29 } |   29 } | 
|   30  |   30  | 
|   31 .opened .open_box { |   31 .opened .open_box { | 
|   32   background-position:-12px -24px; |   32   background-position:-12px -24px; | 
|   33 } |   33 } | 
|   34  |   34  | 
|   35 .item { |   35 .item { | 
|   36   padding: 2px 0px; |   36   padding: 2px 0px; | 
|   37 } |   37 } | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
|   61 .error { |   61 .error { | 
|   62   white-space: nowrap; |   62   white-space: nowrap; | 
|   63   color: red; |   63   color: red; | 
|   64 } |   64 } | 
|   65  |   65  | 
|   66 .more { |   66 .more { | 
|   67   display: block; |   67   display: block; | 
|   68   text-align: right; |   68   text-align: right; | 
|   69   padding-top: 20px; |   69   padding-top: 20px; | 
|   70   padding-right: 10px; |   70   padding-right: 10px; | 
|   71   color: #8888CC; |   71   color: #88C; | 
|   72 } |   72 } | 
|   73  |   73  | 
|   74 </style> |   74 </style> | 
|   75 <script id="iframe_script"> |   75 <script id="iframe_script"> | 
|   76 function reportHeight() { |   76 function reportHeight() { | 
|   77   var msg = JSON.stringify({type:"size", size:document.body.offsetHeight}); |   77   var msg = JSON.stringify({type:"size", size:document.body.offsetHeight}); | 
|   78   parent.postMessage(msg, "*"); |   78   parent.postMessage(msg, "*"); | 
|   79 } |   79 } | 
|   80  |   80  | 
|   81 function frameLoaded() { |   81 function frameLoaded() { | 
|   82   var links = document.getElementsByTagName("A"); |   82   var links = document.getElementsByTagName("A"); | 
|   83   for (i = 0; i < links.length; i++) { |   83   for (i = 0; i < links.length; i++) { | 
|   84     var class = links[i].className; |   84     var class = links[i].className; | 
|   85     if (class != "item_title" && class != "open_box") { |   85     if (class != "item_title" && class != "open_box") { | 
|   86       links[i].addEventListener("click", showStory); |   86       links[i].addEventListener("click", showStory); | 
|   87     } |   87     } | 
|   88   } |   88   } | 
 |   89   window.addEventListener("message", messageHandler); | 
|   89 } |   90 } | 
|   90  |   91  | 
|   91 function showStory(event) { |   92 function showStory(event) { | 
|   92   var href = event.currentTarget.href; |   93   var href = event.currentTarget.href; | 
|   93   parent.postMessage(JSON.stringify({type:"show", url:href}), "*"); |   94   parent.postMessage(JSON.stringify({type:"show", url:href}), "*"); | 
|   94   event.preventDefault(); |   95   event.preventDefault(); | 
|   95 } |   96 } | 
|   96  |   97  | 
|   97 function messageHandler(event) { |   98 function messageHandler(event) { | 
|   98   reportHeight(); |   99   reportHeight(); | 
|   99 } |  100 } | 
|  100  |  101  | 
|  101 window.addEventListener("message", messageHandler); |  | 
|  102 </script> |  102 </script> | 
|  103 <script> |  103 <script> | 
|  104 // Feed URL. |  104 // Feed URL. | 
|  105 var feedUrl = 'http://news.google.com/?output=rss'; |  105 var feedUrl = 'http://news.google.com/?output=rss'; | 
|  106  |  106  | 
|  107 // The XMLHttpRequest object that tries to load and parse the feed. |  107 // The XMLHttpRequest object that tries to load and parse the feed. | 
|  108 var req; |  108 var req; | 
|  109  |  109  | 
|  110 function main() { |  110 function main() { | 
|  111   req = new XMLHttpRequest(); |  111   req = new XMLHttpRequest(); | 
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  301 } |  301 } | 
|  302  |  302  | 
|  303 window.addEventListener("message", iframeMessageHandler); |  303 window.addEventListener("message", iframeMessageHandler); | 
|  304 </script> |  304 </script> | 
|  305 </head> |  305 </head> | 
|  306 <body onload="main();"> |  306 <body onload="main();"> | 
|  307 <a id="title_a"><img id='title'></a> |  307 <a id="title_a"><img id='title'></a> | 
|  308 <div id="feed"></div> |  308 <div id="feed"></div> | 
|  309 </body> |  309 </body> | 
|  310 </html> |  310 </html> | 
| OLD | NEW |