OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 <html> |
| 3 <head> |
| 4 <title>BuildBot Index page</title> |
| 5 <script> |
| 6 var redirect_to = "/console"; |
| 7 |
| 8 function create_redirect_url(url) { |
| 9 var url_no_index = url.replace(/\/index.html$/, ""); |
| 10 var args = ""; |
| 11 var index_of_arg = url_no_index.indexOf("?"); |
| 12 if (index_of_arg != -1) { |
| 13 args = url_no_index.slice(index_of_arg); |
| 14 url_no_index = url_no_index.slice(0, index_of_arg); |
| 15 } |
| 16 var url_no_slash = url_no_index.replace(/\/+$/, ""); |
| 17 var possible = url_no_slash.slice(url_no_slash.length - redirect_to.length); |
| 18 if (possible == redirect_to) { |
| 19 alert("There was an error redirecting you. Please try again later."); |
| 20 return; |
| 21 } |
| 22 |
| 23 new_url = url_no_slash.replace(/$/, redirect_to) + args; |
| 24 document.write("<meta http-equiv='REFRESH' content='0;url=" + new_url + |
| 25 "'>"); |
| 26 } |
| 27 create_redirect_url(location.href); |
| 28 </script> |
| 29 </HEAD> |
| 30 <BODY> |
| 31 </BODY> |
| 32 </HTML> |
OLD | NEW |