mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
commit
a73192b10d
4 changed files with 24 additions and 5 deletions
|
@ -1,5 +1,16 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var socket = io.connect().of("/pluginfw/installer");
|
|
||||||
|
var socket,
|
||||||
|
loc = document.location,
|
||||||
|
port = loc.port == "" ? (loc.protocol == "https:" ? 443 : 80) : loc.port,
|
||||||
|
url = loc.protocol + "//" + loc.hostname + ":" + port + "/",
|
||||||
|
pathComponents = location.pathname.split('/'),
|
||||||
|
// Strip admin/plugins/
|
||||||
|
baseURL = pathComponents.slice(0,pathComponents.length-3).join('/') + '/',
|
||||||
|
resource = baseURL.substring(1) + "socket.io";
|
||||||
|
|
||||||
|
//connect
|
||||||
|
socket = io.connect(url, {resource : resource}).of("/pluginfw/installer");
|
||||||
|
|
||||||
$('.search-results').data('query', {
|
$('.search-results').data('query', {
|
||||||
pattern: '',
|
pattern: '',
|
||||||
|
|
|
@ -203,8 +203,7 @@ function handshake()
|
||||||
//create the url
|
//create the url
|
||||||
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
|
var url = loc.protocol + "//" + loc.hostname + ":" + port + "/";
|
||||||
//find out in which subfolder we are
|
//find out in which subfolder we are
|
||||||
var resource = exports.baseURL + "socket.io";
|
var resource = exports.baseURL.substring(1) + "socket.io";
|
||||||
|
|
||||||
//connect
|
//connect
|
||||||
socket = pad.socket = io.connect(url, {
|
socket = pad.socket = io.connect(url, {
|
||||||
resource: resource,
|
resource: resource,
|
||||||
|
|
|
@ -280,8 +280,12 @@
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
var baseURL = '../';
|
|
||||||
|
|
||||||
|
var pathComponents = location.pathname.split('/');
|
||||||
|
|
||||||
|
// Strip 'p' and the padname from the pathname and set as baseURL
|
||||||
|
var baseURL = pathComponents.slice(0,pathComponents.length-2).join('/') + '/';
|
||||||
|
|
||||||
require.setRootURI(baseURL + "javascripts/src");
|
require.setRootURI(baseURL + "javascripts/src");
|
||||||
require.setLibraryURI(baseURL + "javascripts/lib");
|
require.setLibraryURI(baseURL + "javascripts/lib");
|
||||||
require.setGlobalKeyPath("require");
|
require.setGlobalKeyPath("require");
|
||||||
|
|
|
@ -134,7 +134,12 @@
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
var baseURL = '../../';
|
|
||||||
|
var pathComponents = location.pathname.split('/');
|
||||||
|
|
||||||
|
// Strip 'p', the padname and 'timeslider' from the pathname and set as baseURL
|
||||||
|
var baseURL = pathComponents.slice(0,pathComponents.length-3).join('/') + '/';
|
||||||
|
|
||||||
|
|
||||||
require.setRootURI(baseURL + "javascripts/src");
|
require.setRootURI(baseURL + "javascripts/src");
|
||||||
require.setLibraryURI(baseURL + "javascripts/lib");
|
require.setLibraryURI(baseURL + "javascripts/lib");
|
||||||
|
|
Loading…
Reference in a new issue