Chromium Code Reviews| Index: go-back-with-backspace/pages/installed.js |
| diff --git a/go-back-with-backspace/pages/installed.js b/go-back-with-backspace/pages/installed.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..39b29f2ee9d485b3552011aae45bcb26ebb40743 |
| --- /dev/null |
| +++ b/go-back-with-backspace/pages/installed.js |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2016 Google Inc. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Initialize the page. |
| +function init() { |
| + // Load internationalized strings. |
| + var all = document.getElementsByTagName('*'); |
|
ojan
2016/09/15 19:07:15
document.querySelectorAll('[i18n]') should be fast
|
| + for (var i = 0; i < all.length; ++i) { |
| + var i18n = all[i].getAttribute('i18n'); |
| + if (i18n) |
| + all[i].textContent = chrome.i18n.getMessage(i18n); |
| + } |
| + |
| + document.getElementById('report_page').onclick = function() { |
| + reportPage(); |
| + }; |
| + |
| + document.getElementById('open_options').onclick = function() { |
| + chrome.runtime.openOptionsPage(); |
| + }; |
| + |
| +} |
| + |
| +window.addEventListener('load', init, false); |