Bones/node_modules/browser-sync/lib/templates/connector.tmpl

11 lines
497 B
Cheetah
Raw Normal View History

2017-05-17 13:45:25 -04:00
window.___browserSync___ = {};
___browserSync___.io = window.io;
window.io = window.___browserSync___oldSocketIo;
window.___browserSync___oldSocketIo=undefined;
___browserSync___.socketConfig = %config%;
___browserSync___.url = %url%;
if (location.protocol == "https:" && /^http:/.test(___browserSync___.url)) {
___browserSync___.url = ___browserSync___.url.replace(/^http:/, "https:");
}
___browserSync___.socket = ___browserSync___.io(___browserSync___.url, ___browserSync___.socketConfig);