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

Unified Diff: chrome/browser/resources/snippets_internals.html

Issue 1883523002: chrome://snippets-internals page for debugging NTP snippets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Second code review Created 4 years, 8 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/browser/resources/snippets_internals.html
diff --git a/chrome/browser/resources/snippets_internals.html b/chrome/browser/resources/snippets_internals.html
new file mode 100644
index 0000000000000000000000000000000000000000..0b5adbf9e70819084422ac3b579da270d9122612
--- /dev/null
+++ b/chrome/browser/resources/snippets_internals.html
@@ -0,0 +1,133 @@
+<!--
+Copyright 2016 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.
+-->
+<!DOCTYPE html>
+<html>
+<head>
Marc Treib 2016/04/15 09:00:30 Why did you remove the head and body tags? Is this
jkrcal 2016/04/15 14:11:50 Yes, just trying to be more consistent with the po
+<meta charset="utf-8">
+<if expr="is_android or is_ios">
+<meta name="viewport" content="width=device-width, initial-scale=1.0,
+ maximum-scale=1.0, user-scalable=no">
+</if>
+<title>Snippets Internals</title>
+<link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
+<link rel="stylesheet" href="snippets_internals.css">
+<script src="chrome://resources/js/cr.js"></script>
+<script src="chrome://resources/js/jstemplate_compiled.js"></script>
+<script src="chrome://resources/js/util.js"></script>
+<script src="snippets_internals.js"></script>
+
+<body>
+<div id="info">
+ <div class="section" jsskip="true">
+ <h2>Properties</h2>
+ <table class="section-details">
+ <tr>
+ <td class="name">Snippets enabled
+ <td id="flag-snippets" class="value">
+ <tr>
+ <td class="name">Snippets restricted to hosts
+ <td id="switch-restrict-to-hosts" class="value">
+ </table>
+ </div>
+
+ <div id="snippets" class="section">
+ <h2>Snippets <span class="detail">(click for details)</span></h2>
+ <table class="section-details">
+ <tr jsselect="list" style="display:none">
+ <td class="title-link">
+ <span class="snippet-title" jsvalues="myid:id">
+ <span jscontent="title"></span>
+ &gt;&gt;
+ </span>
+ <div jsvalues="id:id" class="snippet-detail snippet-hidden">
+ <table>
+ <tr>
+ <td>Validity
+ <td class="expiry"><span class="date" jscontent="published">
Bernhard Bauer 2016/04/14 16:50:25 Put the <span> on a new line, as it's a child of t
jkrcal 2016/04/15 08:39:54 Done. The style guide https://google.github.io/st
+ </span> &ndash; <span class="date" jscontent="expires">
+ </span>
+ <tr>
+ <td>Site title
+ <td jscontent="siteTitle">
+ <tr>
+ <td>Text
+ <td jscontent="snippet">
+ <tr>
+ <td>URL
+ <td><a class="url" jsvalues="href:url" jscontent="url"></a>
+ <tr>
+ <td>Favicon
+ <td><a class="url" jsvalues="href:faviconUrl"
+ jscontent="faviconUrl"></a>
+ <tr>
+ <td>Salient image
+ <td><a class="url" jsvalues="href:salientImageUrl"
+ jscontent="salientImageUrl"></a>
+ </table>
+ </div>
+ </table>
+ <div class="detail" id="snippets-empty" jsskip="1"></div>
+ <div class="forms" jsskip="1">
+ <input id="submit-clear" type="submit" value="Clear the list">
+ </div>
+ <div class="forms" jsskip="1">
+ <input id="submit-download" type="submit" value="Add snippets">
+ from hosts <input id="hosts-input" type="text">
+ <div class="detail">
+ e.g. "www.wired.com www.bbc.co.uk", <span id="hosts-help"></span>.
+ </div>
+ </div>
+ </div>
+
+ <div id="discarded-snippets" class="section">
+ <h2>Discarded snippets <span class="detail">(click for details)</span></h2>
+ <table class="section-details">
+ <tr jsselect="list" style="display:none">
+ <td class="title-link">
+ <span class="discarded-snippet-title" jsvalues="myid:id">
+ <span jscontent="title"></span> &gt;&gt;</span>
+ <div jsvalues="id:id" class="snippet-detail snippet-hidden">
+ <table>
+ <tr>
+ <td>Validity
+ <td class="expiry">
+ <span class="date" jscontent="published"></span> &ndash;
+ <span class="date" jscontent="expires"></span>
+ <tr>
+ <td>Text
+ <td jscontent="snippet">
+ <tr>
+ <td>URL
+ <td><a class="url" jsvalues="href:url" jscontent="url"></a>
+ <tr>
+ <td>Favicon
+ <td>
+ <a class="url" jsvalues="href:faviconUrl"
+ jscontent="faviconUrl"></a>
+ <tr>
+ <td>Salient image
+ <td>
+ <a class="url" jsvalues="href:salientImageUrl"
+ jscontent="salientImageUrl"></a>
+ </table>
+ </div>
+ </table>
+ <div class="detail" id="discarded-snippets-empty" jsskip="1"></div>
+ <div class="forms" jsskip="1">
+ <input id="discarded-snippets-clear" type="submit" value="Clear list">
+ </div>
+ </div>
+
+ <div id="hosts" class="section">
+ <h2>Suggestion hosts</h2>
+ <table class="section-details">
+ <tr jsselect="list">
+ <td jscontent="url">
+ </tr>
+ </table>
+ <div class="detail" id="hosts-empty" jsskip="1"></div>
+ </div>
+</div>

Powered by Google App Engine
This is Rietveld 408576698