OLD | NEW |
(Empty) | |
| 1 /* Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. */ |
| 4 |
| 5 cr.define('safe_browsing', function() { |
| 6 'use strict'; |
| 7 |
| 8 function initialize() { |
| 9 chrome.send('expParamList',[]); |
| 10 } |
| 11 |
| 12 function addExperiment(result) { |
| 13 var resLength = result.length; |
| 14 var experimentsListFormatted=""; |
| 15 |
| 16 for (var i = 0; i < resLength; i+=2) { |
| 17 experimentsListFormatted += "<div>" + result[i+1] + " --- " + result [i] + |
| 18 "</div>";} |
| 19 $('experimentsList').innerHTML = experimentsListFormatted; |
| 20 } |
| 21 |
| 22 return { |
| 23 addExperiment: addExperiment, |
| 24 initialize: initialize, |
| 25 }; |
| 26 |
| 27 }); |
| 28 |
| 29 document.addEventListener('DOMContentLoaded', safe_browsing.initialize); |
OLD | NEW |