function() { var multiplex = Reveal.getConfig().multiplex; var socketId = multiplex.id; var socket = io.connect(multiplex.url); socket.on(multiplex.id, function(data) { // ignore data from sockets that aren't ours if (data.socketId !== socketId) { return; } if( window.location.host === 'localhost:1947' ) return; Reveal.slide(data.indexh, data.indexv, data.indexf, 'remote'); }); }()
function absoluteUrl(url) { if (!url) return url; const protocol = url.toLowerCase().split(':')[0]; if (['http', 'https', 'file', 'data'].indexOf(protocol) >= 0) return url; if (url.indexOf('//') === 0) { return location.protocol + url; } else if (url[0] === '/') { return `${location.protocol}//${location.host}${url}`; } else { return `${baseUrl()}/${url}`; } }
wpcom .site( siteId ) .media( mediaId ) .addFiles( files, function ( err, res ) { if ( err ) { throw err; } const redirect = 'http://' + document.location.host + ( ! isLocalhost ? '/image-editor' : '' ) + '/?mediaId=' + res.media[ 0 ].ID + '&siteId=' + siteId; document.location.href = redirect; } )
name:_this.username, password:_this.pwd, }),location.protocol+"//"+location.host); setTimeout(function () { window.close();
sessionStorage.setItem("qqname",obj.nickname); sessionStorage.setItem("qqimg",obj.figureurl_qq_1); window.open(location.protocol+"//"+location.host+"/html/web/controller/register/registerqq.html")
window.addEventListener('message',function(e){ if(e.origin==location.protocol+"//"+location.host)
namespace: 'reveal-notes', type: 'connect', url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search, state: Reveal.getState() } ), '*' );
origin = location.protocol+"//"+location.host;
function b(t, s) { var a = { weibo: [760, 600], renren: [420, 322], qq: [504, 445], weixin: [450, 550], google: [600, 440] }[t] || [550, 400]; return e.open(s + (-1 == s.indexOf("?") ? "?" : "&") + o.param({ origin: h.origin || "http://" + h.host }), "_blank", "width=" + a[0] + ",height=" + a[1] + ",toolbar=no,menubar=no,location=yes") }
const createConnection = (auth) => async (dispatch) => { const socket = await socketIOClient(window.location.host); let data = { id: auth.user.id, }; socket.emit('add_user', data); dispatch({ type: SET_SOCKET_CONNECTION, payload: socket, }); //dispatch(listenForEvents(socket)); }
/** * @inheritdoc */ getDomain() { return window.location.protocol + '//' + window.location.host; }
namespace: 'reveal-notes', type: 'connect', url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search, state: Reveal.getState() } ), '*' );
websocketOn(msgType, event, callback) { let socketHost = window.location.protocol + '//' + window.location.host; //+'/'+msgType; let socket = io(socketHost); socket.emit(msgType); socket.on(event, function(data) { callback(data); }); }
origin = location.protocol+"//"+location.host;