SVN: toys/stbr/index.php

sparky sparky at pld-linux.org
Wed May 16 20:40:53 CEST 2007


Author: sparky
Date: Wed May 16 20:40:52 2007
New Revision: 8565

Modified:
   toys/stbr/index.php
Log:
- no need to make "mailto:" so obscure, use version without document.write 


Modified: toys/stbr/index.php
==============================================================================
--- toys/stbr/index.php	(original)
+++ toys/stbr/index.php	Wed May 16 20:40:52 2007
@@ -25,24 +25,6 @@
 tfoot td a { display: block; padding: 2px 5px; border: 1px outset; float: left; border: 1px solid #c0c0c0; background-color: #ffffff; color: #000000; text-decoration: none; margin-left: 5px }
 </style>
 
-<script type="text/javascript">
-function vm(i,w)
-{
-// from Adam Major; http://ivpro.net
-// some modifications: Piotr Budny
-var proto = "mailto";
-var m = 'gro.xunil-dlp*' + i;
-var t='';
-
-for (i=m.length-1; i >= 0; i--)
-	if (m.charAt(i) == '*')
-		t += '@';
-	else
-		t +=m.charAt(i);
-
-document.write('<a href="' + proto + ':' + t + '">' + w +'</a>');
-}
-</script>
 </head>
 <body>
 
@@ -141,9 +123,6 @@
 	}
 	*/
 
-	$q['who'] = $q['arecipient'];
-	$q['arecipient'] = strrev($q['arecipient']);
-
 	$title = '';
 
 	if(count($filled))
@@ -163,7 +142,7 @@
 ?>
 <tr title='<?=$title?>'>
 <td width="100px"><a href="http://cvs.pld-linux.org/cgi-bin/cvsweb/SPECS/<?=$q['aspec']?>"><?=$q['aspec']?></a></td>
-<td width="80px"><script>vm("<?=$q['arecipient']?>","<?=$q['who']?>");</script></td>
+<td width="80px"><a class="mailto"><?=$q['arecipient']?></a></td>
 <td width="100px"><?=$q['builder']?></td>
 <td width="100px">
 <?=$info?>
@@ -194,5 +173,18 @@
 <img src="http://pl.docs.pld-linux.org/zrzuty_ekr/logo_03.png"/>
 </div>
 
+<script type="text/javascript">
+/* fill href of <a>s with class="mailto" */
+
+(function replace_mailto()
+{
+	var as = document.getElementsByTagName("a"); 
+	for ( var i = 0; i < as.length; i++ ) {
+		if ( as[i].className == "mailto" )
+			as[i].href = "mailto:" + as[i].innerHTML + "@" + "pld-linux.org";
+	}
+}) ();
+</script>
+
 </body>
 </html>


More information about the pld-cvs-commit mailing list