Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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 function toggleMoreBox() { | |
|
Patrick Dubroy
2013/10/21 07:48:51
Can't this also be shared with neterror.js? And do
felt
2013/10/21 13:08:34
neterror's version of toggleMoreBox relies on this
| |
| 6 var helpBoxOuter = $('help-box-outer'); | |
| 7 helpBoxOuter.classList.toggle('hidden'); | |
| 8 var moreLessButton = $('more-less-button'); | |
| 9 if (helpBoxOuter.classList.contains('hidden')) { | |
| 10 moreLessButton.innerText = templateData.more; | |
| 11 } else { | |
| 12 moreLessButton.innerText = templateData.less; | |
| 13 } | |
| 14 } | |
| 15 | |
| 16 function reloadPage() { | |
| 17 sendCommand(CMD_RELOAD); | |
| 18 } | |
| 19 | |
| 20 function setupEvents() { | |
| 21 $('reload-button').addEventListener('click', reloadPage); | |
| 22 $('more-less-button').addEventListener('click', toggleMoreBox); | |
| 23 } | |
| 24 | |
| 25 document.addEventListener('DOMContentLoaded', setupEvents); | |
| OLD | NEW |