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

Unified Diff: chrome/browser/resources/about_stats.js

Issue 10690137: Fix stats counters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 years, 5 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
« no previous file with comments | « chrome/browser/resources/about_stats.html ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/about_stats.js
diff --git a/chrome/browser/resources/about_stats.js b/chrome/browser/resources/about_stats.js
index 82916a4131ae09ff0c5d7173fc2fd8d34c50a7e0..512fba0047aac0c17a0631103db59c8d18354eea 100644
--- a/chrome/browser/resources/about_stats.js
+++ b/chrome/browser/resources/about_stats.js
@@ -51,7 +51,7 @@ function filterMatching(text, nodelist, functionToGetNameNode) {
/* Hides or shows counters based on the user's current filter selection. */
function doFilter() {
- var filter = document.getElementById('filter');
+ var filter = $('filter');
var text = filter.value.toLowerCase();
var nodes = document.getElementsByName('counter');
filterMatching(text, nodes, getCounterNameFromCounterNode);
@@ -108,7 +108,7 @@ function computeTimes() {
function onLoadWork() {
// This is the javascript code that processes the template:
var input = new JsEvalContext(templateData);
- var output = document.getElementById('t');
+ var output = $('t');
jstProcess(input, output);
// Add handlers to dynamically created HTML elements.
@@ -123,7 +123,10 @@ function onLoadWork() {
doColor();
removeNullValues();
computeTimes();
- document.getElementById('filter').focus();
+
+ var filter = $('filter');
+ filter.onkeyup = doFilter;
+ filter.focus();
}
// The function should only be used as the event handler
« no previous file with comments | « chrome/browser/resources/about_stats.html ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698