| 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() { | |
| 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 |