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

Unified Diff: chrome/common/extensions/docs/examples/api/webNavigation/basic/popup.html

Issue 8318001: Adding `content_security_policy` to a few sample extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Docs. Zips. Created 9 years, 2 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
Index: chrome/common/extensions/docs/examples/api/webNavigation/basic/popup.html
diff --git a/chrome/common/extensions/docs/examples/api/webNavigation/basic/popup.html b/chrome/common/extensions/docs/examples/api/webNavigation/basic/popup.html
index 55956aacbae3a1de6ecd1e288194e995d7c45093..1f518020364f64f9054309523d3638923f4f902c 100644
--- a/chrome/common/extensions/docs/examples/api/webNavigation/basic/popup.html
+++ b/chrome/common/extensions/docs/examples/api/webNavigation/basic/popup.html
@@ -7,97 +7,11 @@
<html>
<head>
<title>WebNavigation Tech Demo Popup</title>
- <style>
- body {
- margin: 5px 10px 10px;
- }
-
- h1 {
- color: #53637D;
- font: 26px/1.2 Helvetica, sans-serif;
- font-size: 200%;
- margin: 0;
- padding-bottom: 4px;
- text-shadow: white 0 1px 2px;
- }
-
- body > section {
- border-radius: 5px;
- background: -webkit-linear-gradient(rgba(234, 238, 243, 0.2), #EAEEF3),
- -webkit-linear-gradient(
- left, #EAEEF3, #EAEEF3 97%, #D3D7DB);
- font: 14px/1 Arial,Sans Serif;
- padding: 10px;
- width: 563px;
- max-height: 400px;
- overflow-y: auto;
- box-shadow: inset 0px 2px 5px rgba(0,0,0,0.5);
- }
-
- body > section > ol {
- padding: 0;
- margin: 0;
- list-style: none inside;
- }
-
- body > section > ol > li {
- position: relative;
- margin: 0.5em 0 0.5em 40px;
- }
-
- code {
- word-wrap: break-word;
- background: rgba(255,255,0, 0.5);
- }
-
- em {
- position: absolute;
- top: 0px;
- left: -40px;
- width: 30px;
- text-align: right;
- font: 30px/1 Helvetica, sans-serif;
- font-weight: 700;
- }
-
- p {
- min-height: 30px;
- line-height: 1.2;
- }
- </style>
+ <link href="popup.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Most Requested URLs</h1>
<section></section>
- <script>
- chrome.extension.sendRequest(
- {'type': 'getMostRequestedUrls'},
- function generateList(response) {
- var section = document.querySelector('body>section');
- var results = response.result;
- var ol = document.createElement('ol');
- var li, p, em, code, text;
- var i;
- for (i = 0; i < results.length; i++ ) {
- li = document.createElement('li');
- p = document.createElement('p');
- em = document.createElement('em');
- em.textContent = i + 1;
- code = document.createElement('code');
- code.textContent = results[i].url;
- text = document.createTextNode(
- chrome.i18n.getMessage('navigationDescription',
- [results[i].numRequests,
- results[i].average]));
- p.appendChild(em);
- p.appendChild(code);
- p.appendChild(text);
- li.appendChild(p);
- ol.appendChild(li);
- }
- section.innerHTML = '';
- section.appendChild(ol);
- });
- </script>
+ <script src="popup.js"></script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698