mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-08 11:12:01 +01:00
Merge pull request #2328 from l-y-n-x/blocks-for-custom-script-and-styles
fixed socket.io path
This commit is contained in:
commit
acbcff07b6
4 changed files with 8 additions and 8 deletions
|
@ -7,10 +7,10 @@ $(document).ready(function () {
|
|||
pathComponents = location.pathname.split('/'),
|
||||
// Strip admin/plugins
|
||||
baseURL = pathComponents.slice(0,pathComponents.length-2).join('/') + '/',
|
||||
resource = baseURL.substring(1) + "socket.io";
|
||||
path = baseURL + "socket.io";
|
||||
|
||||
//connect
|
||||
socket = io.connect(url, {resource : resource}).of("/pluginfw/installer");
|
||||
socket = io.connect(url, {path : path}).of("/pluginfw/installer");
|
||||
|
||||
function search(searchTerm, limit) {
|
||||
if(search.searchTerm != searchTerm) {
|
||||
|
|
|
@ -6,10 +6,10 @@ $(document).ready(function () {
|
|||
pathComponents = location.pathname.split('/'),
|
||||
// Strip admin/plugins
|
||||
baseURL = pathComponents.slice(0,pathComponents.length-2).join('/') + '/',
|
||||
resource = baseURL.substring(1) + "socket.io";
|
||||
path = baseURL + "socket.io";
|
||||
|
||||
//connect
|
||||
socket = io.connect(url, {resource : resource}).of("/settings");
|
||||
socket = io.connect(url, {path : path}).of("/settings");
|
||||
|
||||
socket.on('settings', function (settings) {
|
||||
|
||||
|
|
|
@ -168,10 +168,10 @@ function handshake()
|
|||
//create the url
|
||||
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
|
||||
//find out in which subfolder we are
|
||||
var resource = exports.baseURL.substring(1) + "socket.io";
|
||||
var path = exports.baseURL + "socket.io";
|
||||
//connect
|
||||
socket = pad.socket = io.connect(url, {
|
||||
resource: resource,
|
||||
path: path,
|
||||
'max reconnection attempts': 3,
|
||||
'sync disconnect on unload' : false
|
||||
});
|
||||
|
|
|
@ -59,10 +59,10 @@ function init() {
|
|||
//create the url
|
||||
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
|
||||
//find out in which subfolder we are
|
||||
var resource = exports.baseURL.substring(1) + 'socket.io';
|
||||
var path = exports.baseURL + 'socket.io';
|
||||
|
||||
//build up the socket io connection
|
||||
socket = io.connect(url, {resource: resource});
|
||||
socket = io.connect(url, {path: path});
|
||||
|
||||
//send the ready message once we're connected
|
||||
socket.on('connect', function()
|
||||
|
|
Loading…
Reference in a new issue