Project

General

Profile

« Previous | Next » 

Revision 7905

web/vegpath/index.php: URL fragment redirect: Blink the namespace being loaded, rather than displaying "Loading" at the bottom of the page, to make it clearer what's being loaded

View differences:

index.php
23 23
	global $alias, $h_level, $path, $ref;
24 24
	if (is_string($url_func)) $url_func = by_prefix($url_func);
25 25
	
26
	print("<h".$h_level.">".$alias.'#<big><a href="http://'.$alias
26
	print("<h".$h_level.' id="'.$name.'">'.$alias.'#<big><a href="http://'.$alias
27 27
		."#".$name.'">'.$name."</a></big><i>".$suffix."</i></h".$h_level.">\n");
28 28
	if ($ref === strtolower($name)) # found match, so redirect
29 29
	{
......
162 162
if (loc.hash)
163 163
{
164 164
	var fragment = rm_prefix('#', loc.hash)
165
	document.write('<h4 class="progress">Loading '+fragment+'...</h4>')
165
	var namespace = parse_dot_path(fragment).head
166
	document.getElementById(namespace).className = 'progress'
166 167
	document.location = '/'+fragment
167 168
}
168 169
			</script>

Also available in: Unified diff