OSDN Git Service

* GCC_Regression_Tester.wdgt/widget.html: Mark as HTML 4.01,
[pf3gnuchains/gcc-fork.git] / contrib / regression / GCC_Regression_Tester.wdgt / widget.html
index b9fecc2..94f44ad 100644 (file)
@@ -1,5 +1,5 @@
 <!-- Get and update the GCC regression tester's web page.
-     Copyright (C) 2005 Free Software Foundation, Inc.
+     Copyright (C) 2005, 2007 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -17,15 +17,28 @@ You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING.  If not, write to the Free
 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 02110-1301, USA.  -->
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html 
-     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<META http-equiv="Content-Script-Type" content="text/javascript">
-
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+        "http://www.w3.org/TR/html4/strict.dtd">
 <head>
-<script type='text/javascript'>
+<meta http-equiv="Content-Script-Type" content="text/javascript">
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+<title>Regression Tester Status</title>
+<style type='text/css'>
+body {
+       margin: 0px;
+       padding: 0px;
+}
+pre {
+       font-family: Monaco;
+       font-size: 9px;
+       margin: 0px;
+       padding: 1px 2px 1px 2px;
+       color: black;
+       background-color: white;
+       opacity: 0.8;
+}
+</style>
+<script type='text/javascript' defer>
 // A string representing NUM, with a leading zero if it would be 1 digit long
 function dig2 (num) 
 {
@@ -64,6 +77,9 @@ function fromISO (str, key)
 // Update the data
 function updateContents () {
     var url = 'http://gcc.gnu.org/regtest/HEAD/status.txt';
+    if (document.URL && document.URL.substring (0,5) == 'http:') {
+       url = document.URL.replace ('widget.html','status.txt');
+    }
     var xml_request = new XMLHttpRequest();
     
     xml_request.onload = function(e) 
@@ -82,12 +98,7 @@ function gotContents (event, request) {
     if (! request.responseText)
        return;
 
-    var txt = (request.responseText
-              .replace (/&/g,"&amp;")
-              .replace (/</g,"&lt;")
-              .replace (/&quot;/g,"&quot;")
-              .replace (/>;/g,"&gt;"));
-    
+    var txt = request.responseText;
     var today = new Date();
     var date_r = fromISO (txt, "Date");
     var completed_r = fromISO (txt, "Test-Completed");
@@ -102,7 +113,9 @@ function gotContents (event, request) {
        }
 
     var val = txt + "Now: " + getISO (today) + '\n' + eta;
-    document.getElementById ("contents").innerHTML = "<pre>"+val+"<\/pre>";
+    var contEl = document.getElementById ("contents");
+    contEl.removeChild(contEl.firstChild);
+    contEl.appendChild (document.createTextNode (val));
 }
 
 var mainTimer = null;
@@ -132,24 +145,9 @@ function myOnLoad ()
     myOnShow();
 }
 </script>
-<style>
-body {
-       margin: 0px;
-       padding: 0px;
-}
-pre {
-       font-family: Monaco;
-       font-size: 9px;
-       margin: 0px;
-       padding: 1px 2px 1px 2px;
-       color: black;
-       background-color: white;
-       opacity: 0.8;
-}
-</style>
 </head>
 
 <body onLoad='myOnLoad();'>
-<div id="contents">Loading...</div>
+<pre id="contents">Loading...</pre>
 </body>
 </html>