Chromium Code Reviews| Index: chrome/browser/resources/ssl/roadblock.html |
| diff --git a/chrome/browser/resources/ssl/roadblock.html b/chrome/browser/resources/ssl/roadblock.html |
| index 8bebfc610dfae0b24bf89a6026580b755299d99f..9f3d27d802a6cb5c1eb8177a60626a8b058d41ac 100644 |
| --- a/chrome/browser/resources/ssl/roadblock.html |
| +++ b/chrome/browser/resources/ssl/roadblock.html |
| @@ -78,95 +78,8 @@ |
| } |
| </style> |
| <script src="../../../../ui/webui/resources/js/assert.js"></script> |
| - <script> |
| - // Should match SSLBlockingPageCommands in ssl_blocking_page.cc. |
| - var CMD_DONT_PROCEED = 0; |
| - var CMD_PROCEED = 1; |
| - var CMD_FOCUS = 2; |
| - var CMD_MORE = 3; |
| - |
| - var showedMore = false; |
| - var keyPressState = 0; |
| - var gainFocus = false; |
| - var setupExperiment = false; |
| - |
| - function $(o) { |
| - return document.getElementById(o); |
| - } |
| - |
| - function sendCommand(cmd) { |
| - window.domAutomationController.setAutomationId(1); |
| - window.domAutomationController.send(cmd); |
| - } |
| - |
| - function toggleMoreInfo(collapse) { |
| - $('more-info-long').hidden = collapse; |
| - $('more-info-short').hidden = !collapse; |
| - if (!collapse && !showedMore) { |
| - sendCommand(CMD_MORE); |
| - showedMore = true; |
| - } |
| - } |
| - |
| - // This allows errors to be skippped by typing "proceed" into the page. |
| - function keyPressHandler(e) { |
| - var sequence = 'proceed'; |
| - if (sequence.charCodeAt(keyPressState) == e.keyCode) { |
| - keyPressState++; |
| - if (keyPressState == sequence.length) { |
| - sendCommand(CMD_PROCEED); |
| - keyPressState = 0; |
| - } |
| - } else { |
| - keyPressState = 0; |
| - } |
| - } |
| - |
| - // Supports UMA timing, which starts after the warning is first viewed. |
| - function handleFocusEvent() { |
| - if (gainFocus == false) { |
| - sendCommand(CMD_FOCUS); |
| - gainFocus = true; |
| - } |
| - } |
| - |
| - // UI modifications and event listeners that take place after load. |
| - function setupEvents() { |
| - if (templateData.errorType == "overridable") { |
| - // This is the blocking page you can click through. |
| - $('proceed-button').hidden = false; |
| - $('proceed-button').addEventListener('click', function() { |
| - sendCommand(CMD_PROCEED); |
| - }); |
| - } else { |
| - document.addEventListener('keypress', keyPressHandler); |
| - } |
| - |
| - if ($('more-info-title').textContent == '') { |
| - $('more-info-short').hidden = true; |
| - $('more-info-long').hidden = true; |
| - $('twisty-closed').style.display = 'none'; |
| - } else { |
| - $('more-info-short').addEventListener('click', function() { |
| - toggleMoreInfo(false); |
| - }); |
| - $('more-info-long').addEventListener('click', function() { |
| - toggleMoreInfo(true); |
| - }); |
| - } |
| - |
| - $('exit-button').addEventListener('click', function() { |
| - sendCommand(CMD_DONT_PROCEED); |
| - }); |
| - |
| - document.addEventListener('contextmenu', function(e) { |
| - e.preventDefault(); |
| - }); |
| - } |
| - |
| - window.addEventListener('focus', handleFocusEvent); |
| - document.addEventListener('DOMContentLoaded', setupEvents); |
| - </script> |
| + <script src="allsslerrors.js"></script> |
|
Patrick Dubroy
2013/10/21 07:48:51
This should be named all_ssl_errors.js to match ou
felt
2013/10/21 13:08:34
Done.
|
| + <script src="roadblock.js"></script> |
| </head> |
| <body> |
| <div class="box"> |