| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 document.title = 'page cycler'; | 5 document.title = 'page cycler'; |
| 6 | 6 |
| 7 document.cookie = '__navigated_to_report=0; path=/'; |
| 7 document.cookie = '__pc_done=0; path=/'; | 8 document.cookie = '__pc_done=0; path=/'; |
| 8 document.cookie = '__pc_timings=; path=/'; | 9 document.cookie = '__pc_timings=; path=/'; |
| 9 | 10 |
| 10 var options = location.search.substring(1).split('&'); | 11 var options = location.search.substring(1).split('&'); |
| 11 | 12 |
| 12 function getOption(name) { | 13 function getOption(name) { |
| 13 var r = new RegExp('^' + name + '='); | 14 var r = new RegExp('^' + name + '='); |
| 14 for (var i = 0; i < options.length; i++) { | 15 for (var i = 0; i < options.length; i++) { |
| 15 if (options[i].match(r)) { | 16 if (options[i].match(r)) { |
| 16 return options[i].substring(name.length + 1); | 17 return options[i].substring(name.length + 1); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 form.appendChild(input); | 50 form.appendChild(input); |
| 50 | 51 |
| 51 document.body.appendChild(form); | 52 document.body.appendChild(form); |
| 52 } | 53 } |
| 53 | 54 |
| 54 renderForm(); | 55 renderForm(); |
| 55 | 56 |
| 56 // should we start automatically? | 57 // should we start automatically? |
| 57 if (location.search.match('auto=1')) | 58 if (location.search.match('auto=1')) |
| 58 start(); | 59 start(); |
| OLD | NEW |