| Index: chrome/common/extensions/docs/examples/extensions/news_a11y/feed.js
|
| diff --git a/chrome/common/extensions/docs/examples/extensions/news_a11y/feed.html b/chrome/common/extensions/docs/examples/extensions/news_a11y/feed.js
|
| similarity index 82%
|
| copy from chrome/common/extensions/docs/examples/extensions/news_a11y/feed.html
|
| copy to chrome/common/extensions/docs/examples/extensions/news_a11y/feed.js
|
| index 1c0121f32e7712e93a71214889de229d68cd5764..63e7daf22215d19874109bfc32c12fabb9bafbd2 100644
|
| --- a/chrome/common/extensions/docs/examples/extensions/news_a11y/feed.html
|
| +++ b/chrome/common/extensions/docs/examples/extensions/news_a11y/feed.js
|
| @@ -1,107 +1,8 @@
|
| -<!DOCTYPE html>
|
| -<html>
|
| -<head>
|
| -<style>
|
| -body {
|
| - font-family: helvetica, arial, sans-serif;
|
| - font-size: 12px;
|
| - overflow: hidden;
|
| -}
|
| -
|
| -a {
|
| - color:#0000CC;
|
| - text-decoration: underline;
|
| - cursor: pointer;
|
| -}
|
| -
|
| -.open_box {
|
| - display: block;
|
| - overflow: hidden;
|
| - margin-right: 4px;
|
| - margin-top: 2px;
|
| - height: 12px;
|
| - width: 12px;
|
| - float: left;
|
| - clear: left;
|
| - background-image: url(sprite_arrows.gif);
|
| - background-position: 0px -24px;
|
| - cursor: pointer;
|
| -}
|
| -
|
| -.opened .open_box {
|
| - background-position:-12px -24px;
|
| -}
|
| -
|
| -.item {
|
| - padding: 2px 0px;
|
| -}
|
| -
|
| -.item_title {
|
| - display: block;
|
| - min-width: 300px;
|
| - padding-left: 15px;
|
| - cursor: pointer;
|
| -}
|
| -
|
| -.item_desc {
|
| - min-width: 500px;
|
| - height: 0px;
|
| - display: block;
|
| - border: none;
|
| - padding: 0px;
|
| - margin: 0px;
|
| - -webkit-transition: height 0.2s ease-out;
|
| -}
|
| -
|
| -#title {
|
| - display: block;
|
| - margin-left: auto;
|
| -}
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
|
|
| -.error {
|
| - white-space: nowrap;
|
| - color: red;
|
| -}
|
| -
|
| -.more {
|
| - display: block;
|
| - text-align: right;
|
| - padding-top: 20px;
|
| - padding-right: 10px;
|
| - color: #88C;
|
| -}
|
| -
|
| -</style>
|
| -<script id="iframe_script">
|
| -function reportHeight() {
|
| - var msg = JSON.stringify({type:"size", size:document.body.offsetHeight});
|
| - parent.postMessage(msg, "*");
|
| -}
|
| -
|
| -function frameLoaded() {
|
| - var links = document.getElementsByTagName("A");
|
| - for (i = 0; i < links.length; i++) {
|
| - var class = links[i].className;
|
| - if (class != "item_title" && class != "open_box") {
|
| - links[i].addEventListener("click", showStory);
|
| - }
|
| - }
|
| - window.addEventListener("message", messageHandler);
|
| -}
|
| -
|
| -function showStory(event) {
|
| - var href = event.currentTarget.href;
|
| - parent.postMessage(JSON.stringify({type:"show", url:href}), "*");
|
| - event.preventDefault();
|
| -}
|
| -
|
| -function messageHandler(event) {
|
| - reportHeight();
|
| -}
|
| -
|
| -</script>
|
| -<script>
|
| -// Feed URL.
|
| +// Feed
|
| var feedUrl = 'http://news.google.com/?output=rss';
|
|
|
| // The XMLHttpRequest object that tries to load and parse the feed.
|
| @@ -371,11 +272,4 @@ function iframeMessageHandler(e) {
|
| }
|
|
|
| window.addEventListener("message", iframeMessageHandler);
|
| -</script>
|
| -</head>
|
| -<body onload="main();">
|
| -<a id="title_a" tabIndex="0"><img id='title' alt="Google News logo"></a>
|
| -<div id="feed"></div>
|
| -</body>
|
| -</html>
|
| -
|
| +document.addEventListener("DOMContentLoaded", main);
|
|
|