added baseURL export to pad.js, timeslider.js, plugins.js, fixing #670

This commit is contained in:
Matthias Bartelmeß 2012-04-25 10:23:58 +02:00
parent d554420f57
commit 513deef768
5 changed files with 33 additions and 16 deletions

View file

@ -203,7 +203,8 @@ function handshake()
//create the url
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
//find out in which subfolder we are
var resource = loc.pathname.substr(1, loc.pathname.indexOf("/p/")) + "socket.io";
var resource = exports.baseURL + "socket.io";
//connect
socket = pad.socket = io.connect(url, {
resource: resource,
@ -1029,7 +1030,7 @@ var settings = {
};
pad.settings = settings;
exports.baseURL = '';
exports.settings = settings;
exports.createCookie = createCookie;
exports.readCookie = readCookie;