Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | |
|
Sameer Nanda
2011/02/28 22:11:34
change year to 2011
Benson Leung
2011/03/01 02:16:19
Done.
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // External Test Parameters Content Script! | |
| 6 | |
| 7 // initial values. | |
| 8 var test_time_ms = 0; | |
| 9 var should_scroll = false; | |
| 10 var should_scroll_up = false; | |
| 11 var scroll_loop = false; | |
| 12 var scroll_interval_ms = 0; | |
| 13 var scroll_by_pixels = 0; | |
| 14 | |
| 15 document.getElementById('myCustomEventDiv').addEventListener('myCustomEvent', | |
| 16 function() { | |
| 17 // pull our test parameters from divs on this page. | |
| 18 var eventData = document.getElementById('myCustomEventDiv').innerText; | |
| 19 test_time_ms = document.getElementById('test_time_ms').innerText; | |
| 20 should_scroll = document.getElementById('should_scroll').innerText; | |
| 21 should_scroll_up = document.getElementById('should_scroll_up').innerText; | |
| 22 scroll_loop = document.getElementById('scroll_loop').innerText; | |
| 23 scroll_interval_ms = document.getElementById('scroll_interval_ms').innerText ; | |
|
Sameer Nanda
2011/02/28 22:11:34
> 80 columns
Benson Leung
2011/03/01 02:16:19
Done.
| |
| 24 scroll_by_pixels = document.getElementById('scroll_by_pixels').innerText; | |
| 25 | |
| 26 // pass to background page via sendRequest. | |
| 27 var request = { _test_time_ms : test_time_ms, | |
| 28 _should_scroll : should_scroll, | |
| 29 _should_scroll_up : should_scroll_up, | |
| 30 _scroll_loop : scroll_loop, | |
| 31 _scroll_interval_ms : scroll_interval_ms, | |
| 32 _scroll_by_pixels : scroll_by_pixels | |
| 33 } | |
| 34 chrome.extension.sendRequest(request); | |
| 35 } | |
| 36 ); | |
| 37 | |
| OLD | NEW |