Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeHitchens committed Jan 29, 2012
1 parent 9e93a73 commit 7bb8f59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docroot/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ IN THE SOFTWARE.
o.o2j = function(o) { return JSON.stringify(o) }

o.seq = 1;
o.root = document.getElementById("rpc").src // where this script was loaded from
o.cross = /^http/.test(o.root.toLowerCase()) // cross domain? // xxx make smarter
var e = document.getElementById("rpc")
if(e)
o.root = e.src // where this script was loaded from
else
o.root = "."
//o.cross = /^http/.test(o.root.toLowerCase()) // cross domain? // xxx make smarter

o.root += /\/$/.test(o.root) ? "" : "/" // ensure it ends with a slash

Expand Down

0 comments on commit 7bb8f59

Please sign in to comment.