Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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('defaultbrowser', function() { | |
| 6 'use strict'; | |
| 7 | |
| 8 function injectLocalizedStrings() { | |
| 9 $('section-steps--click-edge').innerHTML = | |
|
michaelpg
2016/10/16 23:09:17
why are these not done with $i18n{}? or $i18nRaw{}
Patrick Monette
2016/10/19 23:46:59
I was not aware of $i18nRaw{}; it is doing exactly
| |
| 10 loadTimeData.getString('clickEdgeText'); | |
| 11 $('section-steps--select-chrome').innerHTML = | |
| 12 loadTimeData.getString('clickSelectChrome'); | |
| 13 } | |
| 14 | |
| 15 function onSetDefaultBrowser(e) { | |
| 16 chrome.send('handleSetDefaultBrowser'); | |
| 17 } | |
| 18 | |
| 19 function initialize() { | |
| 20 injectLocalizedStrings(); | |
| 21 | |
| 22 $('set-default-button').addEventListener('click', onSetDefaultBrowser); | |
| 23 } | |
| 24 | |
| 25 return { | |
| 26 initialize: initialize | |
| 27 }; | |
| 28 }); | |
| 29 | |
| 30 document.addEventListener('DOMContentLoaded', defaultbrowser.initialize); | |
| OLD | NEW |