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

Unified Diff: chrome/common/extensions/docs/examples/api/debugger/live-headers/headers.js

Issue 9289057: Changing manifest to v2 extension samples (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding zip files after rebasing with master Created 8 years, 11 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/debugger/live-headers/headers.js
diff --git a/chrome/common/extensions/docs/examples/api/debugger/live-headers/headers.html b/chrome/common/extensions/docs/examples/api/debugger/live-headers/headers.js
similarity index 80%
copy from chrome/common/extensions/docs/examples/api/debugger/live-headers/headers.html
copy to chrome/common/extensions/docs/examples/api/debugger/live-headers/headers.js
index 6261c3e0af94d1e29779d37af8acdea8bc242031..eac021e477be694b25bdf84e6e8a6201ec7ce6ad 100644
--- a/chrome/common/extensions/docs/examples/api/debugger/live-headers/headers.html
+++ b/chrome/common/extensions/docs/examples/api/debugger/live-headers/headers.js
@@ -1,29 +1,6 @@
-<!--
-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.
--->
-
-<html>
-<head>
-<style>
-body {
- font-family: monospace;
- word-wrap: break-word;
-}
-
-#container {
- white-space: pre;
-}
-
-.request {
- border-top: 1px solid black;
- margin-bottom: 10px;
-}
-
-</style>
-
-<script>
+// Copyright (c) 2012 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.
var tabId = parseInt(window.location.search.substring(1));
@@ -88,7 +65,8 @@ function formatHeaders(headers) {
function parseURL(url) {
var result = {};
- var match = url.match(/^([^:]+):\/\/([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i);
+ var match = url.match(
+ /^([^:]+):\/\/([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i);
if (!match)
return result;
result.scheme = match[1].toLowerCase();
@@ -97,12 +75,4 @@ function parseURL(url) {
result.path = match[4] || "/";
result.fragment = match[5];
return result;
-}
-
-</script>
-</head>
-
-<body>
-<div id="container"></div>
-</body>
-</html>
+}

Powered by Google App Engine
This is Rietveld 408576698