| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 function sendCommand(cmd) { | 5 function sendCommand(cmd) { |
| 6 window.domAutomationController.setAutomationId(1); | 6 window.domAutomationController.setAutomationId(1); |
| 7 window.domAutomationController.send(cmd); | 7 window.domAutomationController.send(cmd); |
| 8 } | 8 } |
| 9 | 9 |
| 10 function initialize() { | 10 function initialize() { |
| 11 $('bypass-block-button').onclick = function(event) { | 11 if (!cr.isChromeOS) { |
| 12 sendCommand('preview'); | 12 $('bypass-block-button').onclick = function(event) { |
| 13 sendCommand('preview'); |
| 14 } |
| 13 } | 15 } |
| 14 $('back-button').onclick = function(event) { | 16 $('back-button').onclick = function(event) { |
| 15 sendCommand('back'); | 17 sendCommand('back'); |
| 16 }; | 18 }; |
| 17 $('content-packs-section-button').onclick = function(event) { | 19 $('content-packs-section-button').onclick = function(event) { |
| 18 sendCommand('ntp'); | 20 sendCommand('ntp'); |
| 19 }; | 21 }; |
| 20 } | 22 } |
| 21 | 23 |
| 22 document.addEventListener('DOMContentLoaded', initialize); | 24 document.addEventListener('DOMContentLoaded', initialize); |
| OLD | NEW |