forked from asalga/XB-PointStream
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved code provided by notmasteryet
- Loading branch information
aSydiK
committed
Jul 8, 2010
1 parent
28b0a69
commit ddeccb3
Showing
1 changed file
with
8 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
var ps_include = function(path) { | ||
var lastScript = document.getElementsByTagName("head")[0].lastChild; | ||
var fullUrl = lastScript.src.substring(0, lastScript.src.lastIndexOf('/') + 1) + path; | ||
document.write('<' + 'script'); | ||
document.write(' language="javascript"'); | ||
document.write(' type="text/javascript"'); | ||
document.write(' src="' + fullUrl + '">'); | ||
document.write('</' + 'script' + '>'); | ||
} | ||
var ps_include = ((function(lastScript) { | ||
return (function(path) { | ||
var fullUrl = lastScript.src.substring(0, lastScript.src.lastIndexOf('/') + 1) + path; | ||
var newScript = document.createElement("script"); | ||
newScript.src = fullUrl; | ||
document.getElementsByTagName("head")[0].appendChild(newScript); | ||
}); | ||
})(document.getElementsByTagName("head")[0].lastChild)); | ||
|
||
ps_include('mjs.js'); | ||
ps_include('psapi.js'); |