summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-02-03 12:05:17 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-02-03 12:05:17 +0000
commit30e9a9eec6e5372fd5e720855be3e4c8583d094a (patch)
tree8334ad7231ef838b8497cd7c1ef23ecf32e24070 /www
parent439775dbfd81e218a3788a1bc7c6ba7e4be9c1cd (diff)
downloadgpsd-30e9a9eec6e5372fd5e720855be3e4c8583d094a.tar.gz
Arrange for mod stamp on all pages.
Diffstat (limited to 'www')
-rw-r--r--www/bt.html3
-rw-r--r--www/bu_303b.html4
-rw-r--r--www/datestamp.js54
-rw-r--r--www/gps-hacking.html3
-rw-r--r--www/hardware.html3
-rw-r--r--www/history.html4
-rw-r--r--www/index.html.in3
-rwxr-xr-xwww/upload2
-rw-r--r--www/xgps.html3
9 files changed, 70 insertions, 9 deletions
diff --git a/www/bt.html b/www/bt.html
index e173d4d8..a8c3023c 100644
--- a/www/bt.html
+++ b/www/bt.html
@@ -107,6 +107,7 @@ to specify the path of the GPS and it will work exactly like a serial GPS
<p>Jean-Michel Bouffard</p>
</div>
-</hr>
+<hr/>
+<script language="JavaScript" src="datestamp.js" type='text/javascript'></script>
</body>
</html>
diff --git a/www/bu_303b.html b/www/bu_303b.html
index bb4a488a..42a8bcf0 100644
--- a/www/bu_303b.html
+++ b/www/bu_303b.html
@@ -356,5 +356,7 @@ doesn't send bits.</p>
</body>
</div>
-</hr>
+<hr/>
+<script language="JavaScript" src="datestamp.js" type='text/javascript'></script>
+
</html>
diff --git a/www/datestamp.js b/www/datestamp.js
new file mode 100644
index 00000000..289aae36
--- /dev/null
+++ b/www/datestamp.js
@@ -0,0 +1,54 @@
+// JavaScript to generate a compact date representation
+
+//
+// format date as dd-mmm-yyyyy
+// example: 12-Jan-1999
+//
+function date_ddmmmyyyy(date)
+{
+ var d = date.getDate();
+ var m = date.getMonth() + 1;
+ var y = date.getFullYear();
+
+ // could use splitString() here
+ // but the following method is
+ // more compatible
+ var mmm =
+ ( 1==m)?'Jan':( 2==m)?'Feb':(3==m)?'Mar':
+ ( 4==m)?'Apr':( 5==m)?'May':(6==m)?'Jun':
+ ( 7==m)?'Jul':( 8==m)?'Aug':(9==m)?'Sep':
+ (10==m)?'Oct':(11==m)?'Nov':'Dec';
+
+ return "" +
+ (d<10?"0"+d:d) + " " + mmm + " " + y;
+}
+
+
+//
+// get last modified date of the
+// current document.
+//
+function date_lastmodified()
+{
+ var lmd = document.lastModified;
+ var s = "Unknown";
+ var d1;
+
+ // check if we have a valid date
+ // before proceeding
+ if(0 != (d1=Date.parse(lmd)))
+ {
+ s = "" + date_ddmmmyyyy(new Date(d1));
+ }
+
+ return s;
+}
+
+//
+// finally display the last modified date
+// as DD-MMM-YYYY
+//
+document.writeln(
+ "Last modified on: " + date_lastmodified() );
+
+// End
diff --git a/www/gps-hacking.html b/www/gps-hacking.html
index d6e5bd83..a93b8679 100644
--- a/www/gps-hacking.html
+++ b/www/gps-hacking.html
@@ -415,5 +415,6 @@ and DGPS</a>.</dd>
</body>
</div>
-</hr>
+<hr/>
+<script language="JavaScript" src="datestamp.js" type='text/javascript'></script>
</html>
diff --git a/www/hardware.html b/www/hardware.html
index 83a1c9bc..d19b9b01 100644
--- a/www/hardware.html
+++ b/www/hardware.html
@@ -364,6 +364,7 @@ with PS/2 connectors, presumably going to RS232 or USB adaptors.</td>
SiRF-II contact: Richard Saucedo (408)-392-8385 rsaucedo@sirf.com
-->
-
+<hr/>
+<script language="JavaScript" src="datestamp.js" type='text/javascript'></script>
</body>
</html>
diff --git a/www/history.html b/www/history.html
index 5bcaea71..2df3d78f 100644
--- a/www/history.html
+++ b/www/history.html
@@ -99,7 +99,7 @@ once the 2.0 version is out and tested. perhaps we will all be able
to ignore it for another N years.</p>
</div>
-</hr>
-
+<hr/>
+<script language="JavaScript" src="datestamp.js" type='text/javascript'></script>
</body>
</html>
diff --git a/www/index.html.in b/www/index.html.in
index f7e71cef..a550f890 100644
--- a/www/index.html.in
+++ b/www/index.html.in
@@ -166,6 +166,7 @@ Peoria Sanitary District, nor do we have anything to do with the
General Product Safety Directive.</p>
</div>
-</hr>
+<hr/>
+<script language="JavaScript" src="datestamp.js" type='text/javascript'></script>
</body>
</html>
diff --git a/www/upload b/www/upload
index 702e3953..7f943d53 100755
--- a/www/upload
+++ b/www/upload
@@ -9,4 +9,4 @@ xmlto xhtml-nochunks ../gpsd.xml
xmlto xhtml-nochunks ../libgps.xml
xmlto xhtml-nochunks ../libgpsd.xml
xmlto xhtml-nochunks ../gpsprobe.xml
-scp *.html *.css esr@shell.berlios.de:/home/groups/gpsd/htdocs
+scp *.html *.css *.js esr@shell.berlios.de:/home/groups/gpsd/htdocs
diff --git a/www/xgps.html b/www/xgps.html
index 214c20b7..0a782bec 100644
--- a/www/xgps.html
+++ b/www/xgps.html
@@ -54,7 +54,8 @@ as well as altitude data, and requires at least four good satellites. A
to determine location with better accuracy.</p>
</div>
-<hr />
+<hr/>
+<script language="JavaScript" src="datestamp.js" type='text/javascript'></script>
</body>
</html>