|
From: Carlo W. <li...@us...> - 2002-02-13 16:18:42
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2002-01-13 16:18:39 UTC
Modified files:
libcwd/documentation/scripts/load_style_sheets.js
Log message:
Needed for on-line inclusion of documentation on sourceforge.
---------------------- diff included ----------------------
Index: src/libcwd/documentation/scripts/load_style_sheets.js
diff -u src/libcwd/documentation/scripts/load_style_sheets.js:1.2 src/libcwd/documentation/scripts/load_style_sheets.js:1.3
--- src/libcwd/documentation/scripts/load_style_sheets.js:1.2 Sat Dec 29 20:17:48 2001
+++ src/libcwd/documentation/scripts/load_style_sheets.js Wed Feb 13 08:18:29 2002
@@ -2,24 +2,25 @@
{
var styles_path;
var rootpath;
- var rootpos = location.href.lastIndexOf("libcw.sourceforge.net");
+ var rootpos;
+ rootpos = location.pathname.lastIndexOf("/documentation/");
if (rootpos != -1)
- rootpath = location.href.substring(0,rootpos) + "libcw.sourceforge.net/";
+ rootpath = location.pathname.substring(0,rootpos) + "/documentation/";
else
{
- rootpos = location.pathname.lastIndexOf("/html/");
- if (rootpos != -1)
- rootpath = location.pathname.substring(0,rootpos) + "/";
+ rootpos = location.href.lastIndexOf("libcw.sourceforge.net");
+ if (rootpos != -1)
+ rootpath = location.href.substring(0,rootpos) + "libcw.sourceforge.net/";
else
{
- rootpos = location.pathname.lastIndexOf("/tutorial/");
+ rootpos = location.pathname.lastIndexOf("/html/");
if (rootpos != -1)
rootpath = location.pathname.substring(0,rootpos) + "/";
else
{
- rootpos = location.pathname.lastIndexOf("/documentation/");
- if (rootpos != -1)
- rootpath = location.pathname.substring(0,rootpos) + "/documentation/";
+ rootpos = location.pathname.lastIndexOf("/tutorial/");
+ if (rootpos != -1)
+ rootpath = location.pathname.substring(0,rootpos) + "/";
}
}
}
----------------------- End of diff -----------------------
|