View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/
Update of /cvsroot/dqsd/dqsd
In directory usw-pr-cvs1:/tmp/cvs-serv18163
Modified Files:
loader.js
Log Message:
Allow for multiple references to the same external script file from searches and
add-ons
Index: loader.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/loader.js,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** loader.js 7 Aug 2002 15:05:29 -0000 1.46
--- loader.js 19 Aug 2002 16:11:07 -0000 1.47
***************
*** 206,209 ****
--- 206,210 ----
var xscripts = searchRoot.selectNodes("search/script");
+ var loadedScripts = new Object();
for (var iPrivate = 0; iPrivate < xscripts.length; iPrivate++)
{
***************
*** 211,218 ****
// external scripts (referenced with the 'src' attribute), is by manually
loading them.
var externalScriptRef = xscripts[iPrivate].attributes.getNamedItem("src");
! var xScriptVal;
if ( externalScriptRef )
{
! xScriptVal = readFile( externalScriptRef.text );
}
else
--- 212,229 ----
// external scripts (referenced with the 'src' attribute), is by manually
loading them.
var externalScriptRef = xscripts[iPrivate].attributes.getNamedItem("src");
! var xScriptVal = null;
!
if ( externalScriptRef )
{
! var externalScriptName = externalScriptRef.text;
! if ( loadedScripts[ externalScriptName ] ) // External script is already loaded
! {
! //alert( externalScriptName + ' already loaded' );
! continue;
! }
!
! xScriptVal = readFile( externalScriptName );
!
! loadedScripts[ externalScriptName ] = true;
}
else
***************
*** 220,223 ****
--- 231,235 ----
xScriptVal = xscripts[iPrivate].text;
}
+
try
{
***************
*** 226,230 ****
catch(e)
{
! alert("An error ("+e+") occurred loading script '"+xScriptVal+"'");
}
}
--- 238,242 ----
catch(e)
{
! alert("An error (" + e + ") occurred loading script '" + xScriptVal + "'");
}
}
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/