+2007-12-22 Geoff Keating <geoffk@geoffk.org>
+
+ * GCC_Regression_Tester.wdgt/widget.html: Mark as HTML 4.01,
+ which it now is, rather than XHTML, which it never was.
+ (<head>): Mark as UTF-8. Add title. Move CSS to top of
+ document, specify type. Mark script as 'defer'.
+ (updateContents): If loaded from HTTP, look for status in same
+ place as widget.
+ (gotContents): Use DOM methods to change text rather than innerHTML.
+ (<body>): Eliminate unnecessary DIV element.
+ * GCC_Regression_Tester.wdgt/Info.plist: Update version, copyright
+ notice.
+
2006-09-05 Geoffrey Keating <geoffk@apple.com>
* btest-gcc.sh: .bad_compare has moved to toplevel from gcc/.
<!-- 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.
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)
{
// 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)
if (! request.responseText)
return;
- var txt = (request.responseText
- .replace (/&/g,"&")
- .replace (/</g,"<")
- .replace (/"/g,""")
- .replace (/>;/g,">"));
-
+ var txt = request.responseText;
var today = new Date();
var date_r = fromISO (txt, "Date");
var completed_r = fromISO (txt, "Test-Completed");
}
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;
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>