Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browser-sync-client

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-sync-client - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

186

dist/index.js

@@ -1,6 +0,75 @@

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";
var socket = require("./socket");
var shims = require("./client-shims");
var notify = require("./notify");
var codeSync = require("./code-sync");
var BrowserSync = require("./browser-sync");
var ghostMode = require("./ghostmode");
var emitter = require("./emitter");
var events = require("./events");
var utils = require("./browser.utils").utils;
var shouldReload = false;
/**
* @param options
*/
exports.init = function (options) {
if (shouldReload && options.reloadOnRestart) {
utils.reloadBrowser();
}
var BS = window.___browserSync___ || {};
if (!BS.client) {
BS.client = true;
var browserSync = new BrowserSync(options);
// Always init on page load
ghostMode.init(browserSync);
codeSync.init(browserSync);
if (options.notify) {
notify.init(browserSync);
notify.flash("Connected to BrowserSync");
}
}
};
/**
* Handle individual socket connections
*/
socket.on("connection", exports.init);
socket.on("disconnect", function () {
notify.flash("Disconnected from BrowserSync");
shouldReload = true;
});
/**debug:start**/
if (window.__karma__) {
window.__bs_scroll__ = require("./ghostmode.scroll");
window.__bs_clicks__ = require("./ghostmode.clicks");
window.__bs_location__ = require("./ghostmode.location");
window.__bs_inputs__ = require("./ghostmode.forms.input");
window.__bs_toggles__ = require("./ghostmode.forms.toggles");
window.__bs_submit__ = require("./ghostmode.forms.submit");
window.__bs_forms__ = require("./ghostmode.forms");
window.__bs_utils__ = require("./browser.utils");
window.__bs_emitter__ = emitter;
window.__bs = BrowserSync;
window.__bs_notify__ = notify;
window.__bs_code_sync__ = codeSync;
window.__bs_ghost_mode__ = ghostMode;
window.__bs_socket__ = socket;
window.__bs_index__ = exports;
}
/**debug:end**/
},{"./browser-sync":2,"./browser.utils":3,"./client-shims":4,"./code-sync":5,"./emitter":6,"./events":7,"./ghostmode":13,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.forms.input":9,"./ghostmode.forms.submit":11,"./ghostmode.forms.toggles":12,"./ghostmode.location":14,"./ghostmode.scroll":15,"./notify":16,"./socket":17}],2:[function(require,module,exports){
"use strict";
var socket = require("./socket");
var emitter = require("./emitter");
var notify = require("./notify");

@@ -108,3 +177,3 @@ var utils = require("./browser.utils");

}
},{"./browser.utils":2,"./emitter":5,"./notify":16,"./socket":17}],2:[function(require,module,exports){
},{"./browser.utils":3,"./emitter":6,"./notify":16,"./socket":17}],3:[function(require,module,exports){
"use strict";

@@ -242,3 +311,3 @@

};
},{}],3:[function(require,module,exports){
},{}],4:[function(require,module,exports){
if (!("indexOf" in Array.prototype)) {

@@ -264,3 +333,3 @@

}
},{}],4:[function(require,module,exports){
},{}],5:[function(require,module,exports){
"use strict";

@@ -299,2 +368,5 @@ var events = require("./events");

exports.init = function (bs) {
if (bs.options.tagNames) {
options.tagNames = bs.options.tagNames;
}
exports.saveScroll(utils.getWindow(), utils.getDocument());

@@ -345,3 +417,3 @@ bs.socket.on("file:reload", exports.reload(bs));

var justUrl = /^[^\?]+(?=\?)/.exec(currentValue);
var justUrl = exports.getFilenameOnly(currentValue);

@@ -360,16 +432,14 @@ if (justUrl) {

var body = document.body;
setTimeout(function () {
if (!hiddenElem) {
hiddenElem = document.createElement("DIV");
body.appendChild(hiddenElem);
} else {
hiddenElem.style.display = "none";
hiddenElem.style.display = "block";
}
}, 200);
setTimeout(function () {
if (!hiddenElem) {
hiddenElem = document.createElement("DIV");
body.appendChild(hiddenElem);
} else {
hiddenElem.style.display = "none";
hiddenElem.style.display = "block";
}
}, 200);
return {

@@ -381,2 +451,6 @@ elem: elem,

exports.getFilenameOnly = function (url) {
return /^[^\?]+(?=\?)/.exec(url);
};
/**

@@ -488,3 +562,3 @@ * @param {BrowserSync} bs

};
},{"./browser.utils":2,"./events":6}],5:[function(require,module,exports){
},{"./browser.utils":3,"./events":7}],6:[function(require,module,exports){
"use strict";

@@ -523,3 +597,3 @@

};
},{}],6:[function(require,module,exports){
},{}],7:[function(require,module,exports){
exports._ElementCache = function () {

@@ -805,76 +879,6 @@

},{}],7:[function(require,module,exports){
},{}],8:[function(require,module,exports){
"use strict";
var socket = require("./socket");
var shims = require("./client-shims");
var notify = require("./notify");
var codeSync = require("./code-sync");
var BrowserSync = require("./browser-sync");
var ghostMode = require("./ghostmode");
var emitter = require("./emitter");
var events = require("./events");
var utils = require("./browser.utils").utils;
var shouldReload = false;
/**
* @param options
*/
exports.init = function (options) {
if (shouldReload && options.reloadOnRestart) {
utils.reloadBrowser();
}
var BS = window.___browserSync___ || {};
if (!BS.client) {
BS.client = true;
var browserSync = new BrowserSync(options);
// Always init on page load
ghostMode.init(browserSync);
codeSync.init(browserSync);
if (options.notify) {
notify.init(browserSync);
notify.flash("Connected to BrowserSync");
}
}
};
/**
* Handle individual socket connections
*/
socket.on("connection", exports.init);
socket.on("disconnect", function () {
notify.flash("Disconnected from BrowserSync");
shouldReload = true;
});
/**debug:start**/
if (window.__karma__) {
window.__bs_scroll__ = require("./ghostmode.scroll");
window.__bs_clicks__ = require("./ghostmode.clicks");
window.__bs_location__ = require("./ghostmode.location");
window.__bs_inputs__ = require("./ghostmode.forms.input");
window.__bs_toggles__ = require("./ghostmode.forms.toggles");
window.__bs_submit__ = require("./ghostmode.forms.submit");
window.__bs_forms__ = require("./ghostmode.forms");
window.__bs_utils__ = require("./browser.utils");
window.__bs_emitter__ = emitter;
window.__bs = BrowserSync;
window.__bs_notify__ = notify;
window.__bs_code_sync__ = codeSync;
window.__bs_ghost_mode__ = ghostMode;
window.__bs_socket__ = socket;
window.__bs_index__ = exports;
}
/**debug:end**/
},{"./browser-sync":1,"./browser.utils":2,"./client-shims":3,"./code-sync":4,"./emitter":5,"./events":6,"./ghostmode":13,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.forms.input":9,"./ghostmode.forms.submit":11,"./ghostmode.forms.toggles":12,"./ghostmode.location":14,"./ghostmode.scroll":15,"./notify":16,"./socket":17}],8:[function(require,module,exports){
"use strict";
/**
* This is the plugin for syncing clicks between browsers

@@ -1231,3 +1235,3 @@ * @type {string}

};
},{"./events":6,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.location":14,"./ghostmode.scroll":15}],14:[function(require,module,exports){
},{"./events":7,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.location":14,"./ghostmode.scroll":15}],14:[function(require,module,exports){
"use strict";

@@ -1534,2 +1538,2 @@

};
},{}]},{},[7])
},{}]},{},[1]);

@@ -1,1 +0,1 @@

!function t(e,n,o){function i(s,c){if(!n[s]){if(!e[s]){var a="function"==typeof require&&require;if(!c&&a)return a(s,!0);if(r)return r(s,!0);throw new Error("Cannot find module '"+s+"'")}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return i(n?n:t)},u,u.exports,t,e,n,o)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(t,e){"use strict";function n(t){return"undefined"==typeof t}function o(t,e){for(var n=0,o=e.split("."),i=o.length;i>n;n++){if(!t||"object"!=typeof t)return!1;t=t[o[n]]}return"undefined"==typeof t?!1:t}var i=t("./socket"),r=t("./emitter"),s=(t("./notify"),t("./browser.utils")),c=function(t){this.options=t,this.socket=i,this.emitter=r,this.utils=s.utils;var e=this;i.on("options:set",function(t){r.emit("notify","Setting options..."),e.options=t.options})};c.prototype.canSync=function(t,e){if(t=t||{},t.override)return!0;var n=!0;return e&&(n=this.getOption(e)),n&&t.url===window.location.pathname},c.prototype.getOption=function(t){if(t&&t.match(/\./))return o(this.options,t);var e=this.options[t];return n(e)?!1:e},e.exports=c},{"./browser.utils":2,"./emitter":5,"./notify":16,"./socket":17}],2:[function(t,e,n){"use strict";n.getWindow=function(){return window},n.getDocument=function(){return document},n.utils={getBrowserScrollPosition:function(){var t,e,o=n.getWindow(),i=n.getDocument(),r=i.documentElement,s=i.body;return void 0!==o.pageYOffset?(t=o.pageXOffset,e=o.pageYOffset):(t=r.scrollLeft||s.scrollLeft||0,e=r.scrollTop||s.scrollTop||0),{x:t,y:e}},getScrollSpace:function(){var t=n.getDocument(),e=t.documentElement,o=t.body;return{x:o.scrollHeight-e.clientWidth,y:o.scrollHeight-e.clientHeight}},saveScrollPosition:function(){var t=n.utils.getBrowserScrollPosition();t=[t.x,t.y],document.cookie="bs_scroll_pos="+t.join(",")},restoreScrollPosition:function(){var t=document.cookie.replace(/(?:(?:^|.*;\s*)bs_scroll_pos\s*\=\s*([^;]*).*$)|^.*$/,"$1").split(",");window.scrollTo(t[0],t[1])},getElementIndex:function(t,e){var n=document.getElementsByTagName(t);return Array.prototype.indexOf.call(n,e)},forceChange:function(t){t.blur(),t.focus()},getElementData:function(t){var e=t.tagName,o=n.utils.getElementIndex(e,t);return{tagName:e,index:o}},getSingleElement:function(t,e){var n=document.getElementsByTagName(t);return n[e]},getBody:function(){return document.getElementsByTagName("body")[0]},reloadBrowser:function(){n.getWindow().location.reload(!0)},getWindow:n.getWindow,getDocument:n.getDocument,isOldIe:function(){return"undefined"!=typeof window.attachEvent}}},{}],3:[function(){"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,e){void 0===e&&(e=0),0>e&&(e+=this.length),0>e&&(e=0);for(var n=this.length;n>e;e+=1)if(e in this&&this[e]===t)return e;return-1})},{}],4:[function(t,e,n){"use strict";var o,i=t("./events"),r=t("./browser.utils").utils,s={tagNames:{css:"link",jpg:"img",jpeg:"img",png:"img",svg:"img",gif:"img",js:"script"},attrs:{link:"href",img:"src",script:"src"}},c="codeSync",a=function(){return window.location.pathname};n.init=function(t){n.saveScroll(r.getWindow(),r.getDocument()),t.socket.on("file:reload",n.reload(t)),t.socket.on("browser:reload",function(){t.canSync({url:a()},c)&&n.reloadBrowser(!0)})},n.saveScroll=function(t,e){r.isOldIe()&&("complete"===e.readyState?r.restoreScrollPosition():i.manager.addEvent(e,"readystatechange",function(){"complete"===e.readyState&&r.restoreScrollPosition()}),i.manager.addEvent(window,"beforeunload",r.saveScrollPosition))},n.swapFile=function(t,e,n){var i=t[e],r=(new Date).getTime(),s="?rel="+r,c=/^[^\?]+(?=\?)/.exec(i);c&&(i=c[0]),n&&(n.timestamps||(s="")),t[e]=i+s;var a=document.body;return setTimeout(function(){o?(o.style.display="none",o.style.display="block"):(o=document.createElement("DIV"),a.appendChild(o))},200),{elem:t,timeStamp:r}},n.reload=function(t){return function(e){if(t.canSync({url:a()},c)){var o,i=t.options,r=t.emitter;if((e.url||!i.injectChanges)&&n.reloadBrowser(!0),e.assetFileName&&e.fileExtension){var s=n.getElems(e.fileExtension),u=n.getMatches(s.elems,e.assetFileName,s.attr);u.length&&i.notify&&r.emit("notify",{message:"Injected: "+e.assetFileName});for(var l=0,f=u.length;f>l;l+=1)o=n.swapFile(u[l],s.attr,i)}return o}}},n.getTagName=function(t){return s.tagNames[t]},n.getAttr=function(t){return s.attrs[t]},n.getMatches=function(t,e,n){for(var o=[],i=0,r=t.length;r>i;i+=1)-1!==t[i][n].indexOf(e)&&o.push(t[i]);return o},n.getElems=function(t){var e=n.getTagName(t),o=n.getAttr(e);return{elems:document.getElementsByTagName(e),attr:o}},n.getWindow=function(){return window},n.reloadBrowser=function(t){var e=n.getWindow();t&&e.location.reload(!0)}},{"./browser.utils":2,"./events":6}],5:[function(t,e,n){"use strict";n.events={},n.emit=function(t,e){var o,i=n.events[t];if(i&&i.listeners){o=i.listeners;for(var r=0,s=o.length;s>r;r+=1)o[r](e)}},n.on=function(t,e){var o=n.events;o[t]?o[t].listeners.push(e):o[t]={listeners:[e]}}},{}],6:[function(t,e,n){n._ElementCache=function(){var t={},e=1,n="data"+(new Date).getTime();this.getData=function(o){var i=o[n];return i||(i=o[n]=e++,t[i]={}),t[i]},this.removeData=function(e){var o=e[n];if(o){delete t[o];try{delete e[n]}catch(i){e.removeAttribute&&e.removeAttribute(n)}}}},n._fixEvent=function(t){function e(){return!0}function n(){return!1}if(!t||!t.stopPropagation){var o=t||window.event;t={};for(var i in o)t[i]=o[i];if(t.target||(t.target=t.srcElement||document),t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement,t.preventDefault=function(){t.returnValue=!1,t.isDefaultPrevented=e},t.isDefaultPrevented=n,t.stopPropagation=function(){t.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){this.isImmediatePropagationStopped=e,this.stopPropagation()},t.isImmediatePropagationStopped=n,null!=t.clientX){var r=document.documentElement,s=document.body;t.pageX=t.clientX+(r&&r.scrollLeft||s&&s.scrollLeft||0)-(r&&r.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||s&&s.scrollTop||0)-(r&&r.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!=t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t},n._EventManager=function(t){function e(e,n){function o(t){for(var e in t)return!1;return!0}var i=t.getData(e);0===i.handlers[n].length&&(delete i.handlers[n],document.removeEventListener?e.removeEventListener(n,i.dispatcher,!1):document.detachEvent&&e.detachEvent("on"+n,i.dispatcher)),o(i.handlers)&&(delete i.handlers,delete i.dispatcher),o(i)&&t.removeData(e)}var o=1;this.addEvent=function(e,i,r){var s=t.getData(e);s.handlers||(s.handlers={}),s.handlers[i]||(s.handlers[i]=[]),r.guid||(r.guid=o++),s.handlers[i].push(r),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t){if(!s.disabled){t=n._fixEvent(t);var o=s.handlers[t.type];if(o)for(var i=0;i<o.length;i++)o[i].call(e,t)}}),1==s.handlers[i].length&&(document.addEventListener?e.addEventListener(i,s.dispatcher,!1):document.attachEvent&&e.attachEvent("on"+i,s.dispatcher))},this.removeEvent=function(n,o,i){var r=t.getData(n);if(r.handlers){var s=function(t){r.handlers[t]=[],e(n,t)};if(o){var c=r.handlers[o];if(c){if(!i)return void s(o);if(i.guid)for(var a=0;a<c.length;a++)c[a].guid===i.guid&&c.splice(a--,1);e(n,o)}}else for(var u in r.handlers)s(u)}},this.proxy=function(t,e){e.guid||(e.guid=o++);var n=function(){return e.apply(t,arguments)};return n.guid=e.guid,n}},n.triggerClick=function(t){var e;document.createEvent?window.setTimeout(function(){e=document.createEvent("MouseEvents"),e.initEvent("click",!0,!0),t.dispatchEvent(e)},0):window.setTimeout(function(){document.createEventObject&&(e=document.createEventObject(),e.cancelBubble=!0,t.fireEvent("onclick",e))},0)};var o=new n._ElementCache,i=new n._EventManager(o);i.triggerClick=n.triggerClick,n.manager=i},{}],7:[function(t,e,n){"use strict";var o=t("./socket"),i=(t("./client-shims"),t("./notify")),r=t("./code-sync"),s=t("./browser-sync"),c=t("./ghostmode"),a=(t("./emitter"),t("./events"),t("./browser.utils").utils),u=!1;n.init=function(t){u&&t.reloadOnRestart&&a.reloadBrowser();var e=window.___browserSync___||{};if(!e.client){e.client=!0;var n=new s(t);c.init(n),r.init(n),t.notify&&(i.init(n),i.flash("Connected to BrowserSync"))}},o.on("connection",n.init),o.on("disconnect",function(){i.flash("Disconnected from BrowserSync"),u=!0})},{"./browser-sync":1,"./browser.utils":2,"./client-shims":3,"./code-sync":4,"./emitter":5,"./events":6,"./ghostmode":13,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.forms.input":9,"./ghostmode.forms.submit":11,"./ghostmode.forms.toggles":12,"./ghostmode.location":14,"./ghostmode.scroll":15,"./notify":16,"./socket":17}],8:[function(t,e,n){"use strict";var o="click",i="ghostMode.clicks";n.canEmitEvents=!0,n.init=function(t,e){e.addEvent(document.body,o,n.browserEvent(t)),t.socket.on(o,n.socketEvent(t,e))},n.browserEvent=function(t){return function(e){if(n.canEmitEvents){var i=e.target||e.srcElement;if("checkbox"===i.type||"radio"===i.type)return void t.utils.forceChange(i);t.socket.emit(o,t.utils.getElementData(i))}else n.canEmitEvents=!0}},n.socketEvent=function(t,e){return function(o){if(!t.canSync(o,i))return!1;var r=t.utils.getSingleElement(o.tagName,o.index);r&&(n.canEmitEvents=!1,e.triggerClick(r))}}},{}],9:[function(t,e,n){"use strict";var o="input:text",i="ghostMode.forms.inputs";n.canEmitEvents=!0,n.init=function(t,e){e.addEvent(document.body,"keyup",n.browserEvent(t)),t.socket.on(o,n.socketEvent(t,e))},n.browserEvent=function(t){return function(e){var i,r=e.target||e.srcElement;n.canEmitEvents?("INPUT"===r.tagName||"TEXTAREA"===r.tagName)&&(i=t.utils.getElementData(r),i.value=r.value,t.socket.emit(o,i)):n.canEmitEvents=!0}},n.socketEvent=function(t){return function(e){if(!t.canSync(e,i))return!1;var n=t.utils.getSingleElement(e.tagName,e.index);return n?(n.value=e.value,n):!1}}},{}],10:[function(t,e,n){"use strict";n.plugins={inputs:t("./ghostmode.forms.input"),toggles:t("./ghostmode.forms.toggles"),submit:t("./ghostmode.forms.submit")},n.init=function(t,e){function o(o){n.plugins[o].init(t,e)}var i=!0,r=t.options.ghostMode.forms;r===!0&&(i=!1);for(var s in n.plugins)i?r[s]&&o(s):o(s)}},{"./ghostmode.forms.input":9,"./ghostmode.forms.submit":11,"./ghostmode.forms.toggles":12}],11:[function(t,e,n){"use strict";var o="form:submit",i="ghostMode.forms.submit";n.canEmitEvents=!0,n.init=function(t,e){var i=n.browserEvent(t);e.addEvent(document.body,"submit",i),e.addEvent(document.body,"reset",i),t.socket.on(o,n.socketEvent(t,e))},n.browserEvent=function(t){return function(e){if(n.canEmitEvents){var i=e.target||e.srcElement,r=t.utils.getElementData(i);r.type=e.type,t.socket.emit(o,r)}else n.canEmitEvents=!0}},n.socketEvent=function(t){return function(e){if(!t.canSync(e,i))return!1;var o=t.utils.getSingleElement(e.tagName,e.index);return n.canEmitEvents=!1,o&&"submit"===e.type&&o.submit(),o&&"reset"===e.type&&o.reset(),!1}}},{}],12:[function(t,e,n){"use strict";var o="input:toggles",i="ghostMode.forms.toggles";n.canEmitEvents=!0,n.init=function(t,e){var i=n.browserEvent(t);n.addEvents(e,i),t.socket.on(o,n.socketEvent(t,e))},n.addEvents=function(t,e){function n(n){for(var o=0,i=n.length;i>o;o+=1)t.addEvent(n[o],"change",e)}var o=document.getElementsByTagName("select"),i=document.getElementsByTagName("input");n(o),n(i)},n.browserEvent=function(t){return function(e){if(n.canEmitEvents){var i,r=e.target||e.srcElement;("radio"===r.type||"checkbox"===r.type||"SELECT"===r.tagName)&&(i=t.utils.getElementData(r),i.type=r.type,i.value=r.value,i.checked=r.checked,t.socket.emit(o,i))}else n.canEmitEvents=!0}},n.socketEvent=function(t){return function(e){if(!t.canSync(e,i))return!1;n.canEmitEvents=!1;var o=t.utils.getSingleElement(e.tagName,e.index);return o?("radio"===e.type&&(o.checked=!0),"checkbox"===e.type&&(o.checked=e.checked),"SELECT"===e.tagName&&(o.value=e.value),o):!1}}},{}],13:[function(t,e,n){"use strict";var o=t("./events").manager;n.plugins={scroll:t("./ghostmode.scroll"),clicks:t("./ghostmode.clicks"),forms:t("./ghostmode.forms"),location:t("./ghostmode.location")},n.init=function(t){for(var e in n.plugins)n.plugins[e].init(t,o)}},{"./events":6,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.location":14,"./ghostmode.scroll":15}],14:[function(t,e,n){"use strict";var o="browser:location",i="ghostMode.location";n.canEmitEvents=!0,n.init=function(t){t.socket.on(o,n.socketEvent(t))},n.socketEvent=function(t){return function(e){return t.canSync(e,i)?void(e.path?n.setPath(e.path):n.setUrl(e.url)):!1}},n.setUrl=function(t){window.location=t},n.setPath=function(t){window.location=window.location.protocol+"//"+window.location.host+t}},{}],15:[function(t,e,n){"use strict";var o,i="scroll",r="ghostMode.scroll";n.canEmitEvents=!0,n.init=function(t,e){o=t.utils,e.addEvent(window,i,n.browserEvent(t)),t.socket.on(i,n.socketEvent(t))},n.socketEvent=function(t){return function(e){if(!t.canSync(e,r))return!1;var i=o.getScrollSpace();return n.canEmitEvents=!1,t.options&&t.options.scrollProportionally?window.scrollTo(0,i.y*e.position.proportional):window.scrollTo(0,e.position.raw)}},n.browserEvent=function(t){return function(){var e=n.canEmitEvents;e&&t.socket.emit(i,{position:n.getScrollPosition()}),n.canEmitEvents=!0}},n.getScrollPosition=function(){var t=o.getBrowserScrollPosition();return{raw:t,proportional:n.getScrollTopPercentage(t)}},n.getScrollPercentage=function(t,e){var n=e.x/t.x,o=e.y/t.y;return{x:n||0,y:o}},n.getScrollTopPercentage=function(t){var e=o.getScrollSpace(),i=n.getScrollPercentage(e,t);return i.y}},{}],16:[function(t,e,n){"use strict";var o,i,r,s,c=(t("./ghostmode.scroll"),["display: none","padding: 15px","font-family: sans-serif","position: fixed","font-size: 0.9em","z-index: 9999","right: 0px","top: 0px","border-bottom-left-radius: 5px","background-color: #1B2032","margin: 0","color: white","text-align: center"]);n.init=function(t){o=t,r=t.options;var e=c;r.notify.styles&&(e=r.notify.styles),i=document.createElement("DIV"),i.id="__bs_notify__",i.style.cssText=e.join(";"),document.getElementsByTagName("body")[0].appendChild(i);var s=n.watchEvent();return o.emitter.on("notify",s),o.socket.on("browser:notify",s),i},n.watchEvent=function(){return function(t){return"string"==typeof t?n.flash(t):void n.flash(t.message,t.timeout)}},n.getElem=function(){return i},n.getScrollTop=function(){return o.utils.getBrowserScrollPosition().y},n.flash=function(t,e){var o=n.getElem();return o?(o.innerHTML=t,o.style.display="block",s&&(clearTimeout(s),s=void 0),s=window.setTimeout(function(){o.style.display="none"},e||2e3),o):!1}},{"./ghostmode.scroll":15}],17:[function(t,e,n){"use strict";var o=window.___browserSync___||{};n.socket=o.socket||{emit:function(){},on:function(){}},n.getPath=function(){return window.location.pathname},n.emit=function(t,e){var o=n.socket;o&&o.emit&&(e.url=n.getPath(),o.emit(t,e))},n.on=function(t,e){n.socket.on(t,e)}},{}]},{},[7]);
!function t(e,n,o){function i(s,c){if(!n[s]){if(!e[s]){var a="function"==typeof require&&require;if(!c&&a)return a(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return i(n?n:t)},l,l.exports,t,e,n,o)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(t,e,n){"use strict";var o=t("./socket"),i=(t("./client-shims"),t("./notify")),r=t("./code-sync"),s=t("./browser-sync"),c=t("./ghostmode"),a=(t("./emitter"),t("./events"),t("./browser.utils").utils),u=!1;n.init=function(t){u&&t.reloadOnRestart&&a.reloadBrowser();var e=window.___browserSync___||{};if(!e.client){e.client=!0;var n=new s(t);c.init(n),r.init(n),t.notify&&(i.init(n),i.flash("Connected to BrowserSync"))}},o.on("connection",n.init),o.on("disconnect",function(){i.flash("Disconnected from BrowserSync"),u=!0})},{"./browser-sync":2,"./browser.utils":3,"./client-shims":4,"./code-sync":5,"./emitter":6,"./events":7,"./ghostmode":13,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.forms.input":9,"./ghostmode.forms.submit":11,"./ghostmode.forms.toggles":12,"./ghostmode.location":14,"./ghostmode.scroll":15,"./notify":16,"./socket":17}],2:[function(t,e){"use strict";function n(t){return"undefined"==typeof t}function o(t,e){for(var n=0,o=e.split("."),i=o.length;i>n;n++){if(!t||"object"!=typeof t)return!1;t=t[o[n]]}return"undefined"==typeof t?!1:t}var i=t("./socket"),r=t("./emitter"),s=(t("./notify"),t("./browser.utils")),c=function(t){this.options=t,this.socket=i,this.emitter=r,this.utils=s.utils;var e=this;i.on("options:set",function(t){r.emit("notify","Setting options..."),e.options=t.options})};c.prototype.canSync=function(t,e){if(t=t||{},t.override)return!0;var n=!0;return e&&(n=this.getOption(e)),n&&t.url===window.location.pathname},c.prototype.getOption=function(t){if(t&&t.match(/\./))return o(this.options,t);var e=this.options[t];return n(e)?!1:e},e.exports=c},{"./browser.utils":3,"./emitter":6,"./notify":16,"./socket":17}],3:[function(t,e,n){"use strict";n.getWindow=function(){return window},n.getDocument=function(){return document},n.utils={getBrowserScrollPosition:function(){var t,e,o=n.getWindow(),i=n.getDocument(),r=i.documentElement,s=i.body;return void 0!==o.pageYOffset?(t=o.pageXOffset,e=o.pageYOffset):(t=r.scrollLeft||s.scrollLeft||0,e=r.scrollTop||s.scrollTop||0),{x:t,y:e}},getScrollSpace:function(){var t=n.getDocument(),e=t.documentElement,o=t.body;return{x:o.scrollHeight-e.clientWidth,y:o.scrollHeight-e.clientHeight}},saveScrollPosition:function(){var t=n.utils.getBrowserScrollPosition();t=[t.x,t.y],document.cookie="bs_scroll_pos="+t.join(",")},restoreScrollPosition:function(){var t=document.cookie.replace(/(?:(?:^|.*;\s*)bs_scroll_pos\s*\=\s*([^;]*).*$)|^.*$/,"$1").split(",");window.scrollTo(t[0],t[1])},getElementIndex:function(t,e){var n=document.getElementsByTagName(t);return Array.prototype.indexOf.call(n,e)},forceChange:function(t){t.blur(),t.focus()},getElementData:function(t){var e=t.tagName,o=n.utils.getElementIndex(e,t);return{tagName:e,index:o}},getSingleElement:function(t,e){var n=document.getElementsByTagName(t);return n[e]},getBody:function(){return document.getElementsByTagName("body")[0]},reloadBrowser:function(){n.getWindow().location.reload(!0)},getWindow:n.getWindow,getDocument:n.getDocument,isOldIe:function(){return"undefined"!=typeof window.attachEvent}}},{}],4:[function(){"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,e){void 0===e&&(e=0),0>e&&(e+=this.length),0>e&&(e=0);for(var n=this.length;n>e;e+=1)if(e in this&&this[e]===t)return e;return-1})},{}],5:[function(t,e,n){"use strict";var o,i=t("./events"),r=t("./browser.utils").utils,s={tagNames:{css:"link",jpg:"img",jpeg:"img",png:"img",svg:"img",gif:"img",js:"script"},attrs:{link:"href",img:"src",script:"src"}},c="codeSync",a=function(){return window.location.pathname};n.init=function(t){t.options.tagNames&&(s.tagNames=t.options.tagNames),n.saveScroll(r.getWindow(),r.getDocument()),t.socket.on("file:reload",n.reload(t)),t.socket.on("browser:reload",function(){t.canSync({url:a()},c)&&n.reloadBrowser(!0)})},n.saveScroll=function(t,e){r.isOldIe()&&("complete"===e.readyState?r.restoreScrollPosition():i.manager.addEvent(e,"readystatechange",function(){"complete"===e.readyState&&r.restoreScrollPosition()}),i.manager.addEvent(window,"beforeunload",r.saveScrollPosition))},n.swapFile=function(t,e,i){var r=t[e],s=(new Date).getTime(),c="?rel="+s,a=n.getFilenameOnly(r);a&&(r=a[0]),i&&(i.timestamps||(c="")),t[e]=r+c;var u=document.body;return setTimeout(function(){o?(o.style.display="none",o.style.display="block"):(o=document.createElement("DIV"),u.appendChild(o))},200),{elem:t,timeStamp:s}},n.getFilenameOnly=function(t){return/^[^\?]+(?=\?)/.exec(t)},n.reload=function(t){return function(e){if(t.canSync({url:a()},c)){var o,i=t.options,r=t.emitter;if((e.url||!i.injectChanges)&&n.reloadBrowser(!0),e.assetFileName&&e.fileExtension){var s=n.getElems(e.fileExtension),u=n.getMatches(s.elems,e.assetFileName,s.attr);u.length&&i.notify&&r.emit("notify",{message:"Injected: "+e.assetFileName});for(var l=0,f=u.length;f>l;l+=1)o=n.swapFile(u[l],s.attr,i)}return o}}},n.getTagName=function(t){return s.tagNames[t]},n.getAttr=function(t){return s.attrs[t]},n.getMatches=function(t,e,n){for(var o=[],i=0,r=t.length;r>i;i+=1)-1!==t[i][n].indexOf(e)&&o.push(t[i]);return o},n.getElems=function(t){var e=n.getTagName(t),o=n.getAttr(e);return{elems:document.getElementsByTagName(e),attr:o}},n.getWindow=function(){return window},n.reloadBrowser=function(t){var e=n.getWindow();t&&e.location.reload(!0)}},{"./browser.utils":3,"./events":7}],6:[function(t,e,n){"use strict";n.events={},n.emit=function(t,e){var o,i=n.events[t];if(i&&i.listeners){o=i.listeners;for(var r=0,s=o.length;s>r;r+=1)o[r](e)}},n.on=function(t,e){var o=n.events;o[t]?o[t].listeners.push(e):o[t]={listeners:[e]}}},{}],7:[function(t,e,n){n._ElementCache=function(){var t={},e=1,n="data"+(new Date).getTime();this.getData=function(o){var i=o[n];return i||(i=o[n]=e++,t[i]={}),t[i]},this.removeData=function(e){var o=e[n];if(o){delete t[o];try{delete e[n]}catch(i){e.removeAttribute&&e.removeAttribute(n)}}}},n._fixEvent=function(t){function e(){return!0}function n(){return!1}if(!t||!t.stopPropagation){var o=t||window.event;t={};for(var i in o)t[i]=o[i];if(t.target||(t.target=t.srcElement||document),t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement,t.preventDefault=function(){t.returnValue=!1,t.isDefaultPrevented=e},t.isDefaultPrevented=n,t.stopPropagation=function(){t.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){this.isImmediatePropagationStopped=e,this.stopPropagation()},t.isImmediatePropagationStopped=n,null!=t.clientX){var r=document.documentElement,s=document.body;t.pageX=t.clientX+(r&&r.scrollLeft||s&&s.scrollLeft||0)-(r&&r.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||s&&s.scrollTop||0)-(r&&r.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!=t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t},n._EventManager=function(t){function e(e,n){function o(t){for(var e in t)return!1;return!0}var i=t.getData(e);0===i.handlers[n].length&&(delete i.handlers[n],document.removeEventListener?e.removeEventListener(n,i.dispatcher,!1):document.detachEvent&&e.detachEvent("on"+n,i.dispatcher)),o(i.handlers)&&(delete i.handlers,delete i.dispatcher),o(i)&&t.removeData(e)}var o=1;this.addEvent=function(e,i,r){var s=t.getData(e);s.handlers||(s.handlers={}),s.handlers[i]||(s.handlers[i]=[]),r.guid||(r.guid=o++),s.handlers[i].push(r),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t){if(!s.disabled){t=n._fixEvent(t);var o=s.handlers[t.type];if(o)for(var i=0;i<o.length;i++)o[i].call(e,t)}}),1==s.handlers[i].length&&(document.addEventListener?e.addEventListener(i,s.dispatcher,!1):document.attachEvent&&e.attachEvent("on"+i,s.dispatcher))},this.removeEvent=function(n,o,i){var r=t.getData(n);if(r.handlers){var s=function(t){r.handlers[t]=[],e(n,t)};if(o){var c=r.handlers[o];if(c){if(!i)return void s(o);if(i.guid)for(var a=0;a<c.length;a++)c[a].guid===i.guid&&c.splice(a--,1);e(n,o)}}else for(var u in r.handlers)s(u)}},this.proxy=function(t,e){e.guid||(e.guid=o++);var n=function(){return e.apply(t,arguments)};return n.guid=e.guid,n}},n.triggerClick=function(t){var e;document.createEvent?window.setTimeout(function(){e=document.createEvent("MouseEvents"),e.initEvent("click",!0,!0),t.dispatchEvent(e)},0):window.setTimeout(function(){document.createEventObject&&(e=document.createEventObject(),e.cancelBubble=!0,t.fireEvent("onclick",e))},0)};var o=new n._ElementCache,i=new n._EventManager(o);i.triggerClick=n.triggerClick,n.manager=i},{}],8:[function(t,e,n){"use strict";var o="click",i="ghostMode.clicks";n.canEmitEvents=!0,n.init=function(t,e){e.addEvent(document.body,o,n.browserEvent(t)),t.socket.on(o,n.socketEvent(t,e))},n.browserEvent=function(t){return function(e){if(n.canEmitEvents){var i=e.target||e.srcElement;if("checkbox"===i.type||"radio"===i.type)return void t.utils.forceChange(i);t.socket.emit(o,t.utils.getElementData(i))}else n.canEmitEvents=!0}},n.socketEvent=function(t,e){return function(o){if(!t.canSync(o,i))return!1;var r=t.utils.getSingleElement(o.tagName,o.index);r&&(n.canEmitEvents=!1,e.triggerClick(r))}}},{}],9:[function(t,e,n){"use strict";var o="input:text",i="ghostMode.forms.inputs";n.canEmitEvents=!0,n.init=function(t,e){e.addEvent(document.body,"keyup",n.browserEvent(t)),t.socket.on(o,n.socketEvent(t,e))},n.browserEvent=function(t){return function(e){var i,r=e.target||e.srcElement;n.canEmitEvents?("INPUT"===r.tagName||"TEXTAREA"===r.tagName)&&(i=t.utils.getElementData(r),i.value=r.value,t.socket.emit(o,i)):n.canEmitEvents=!0}},n.socketEvent=function(t){return function(e){if(!t.canSync(e,i))return!1;var n=t.utils.getSingleElement(e.tagName,e.index);return n?(n.value=e.value,n):!1}}},{}],10:[function(t,e,n){"use strict";n.plugins={inputs:t("./ghostmode.forms.input"),toggles:t("./ghostmode.forms.toggles"),submit:t("./ghostmode.forms.submit")},n.init=function(t,e){function o(o){n.plugins[o].init(t,e)}var i=!0,r=t.options.ghostMode.forms;r===!0&&(i=!1);for(var s in n.plugins)i?r[s]&&o(s):o(s)}},{"./ghostmode.forms.input":9,"./ghostmode.forms.submit":11,"./ghostmode.forms.toggles":12}],11:[function(t,e,n){"use strict";var o="form:submit",i="ghostMode.forms.submit";n.canEmitEvents=!0,n.init=function(t,e){var i=n.browserEvent(t);e.addEvent(document.body,"submit",i),e.addEvent(document.body,"reset",i),t.socket.on(o,n.socketEvent(t,e))},n.browserEvent=function(t){return function(e){if(n.canEmitEvents){var i=e.target||e.srcElement,r=t.utils.getElementData(i);r.type=e.type,t.socket.emit(o,r)}else n.canEmitEvents=!0}},n.socketEvent=function(t){return function(e){if(!t.canSync(e,i))return!1;var o=t.utils.getSingleElement(e.tagName,e.index);return n.canEmitEvents=!1,o&&"submit"===e.type&&o.submit(),o&&"reset"===e.type&&o.reset(),!1}}},{}],12:[function(t,e,n){"use strict";var o="input:toggles",i="ghostMode.forms.toggles";n.canEmitEvents=!0,n.init=function(t,e){var i=n.browserEvent(t);n.addEvents(e,i),t.socket.on(o,n.socketEvent(t,e))},n.addEvents=function(t,e){function n(n){for(var o=0,i=n.length;i>o;o+=1)t.addEvent(n[o],"change",e)}var o=document.getElementsByTagName("select"),i=document.getElementsByTagName("input");n(o),n(i)},n.browserEvent=function(t){return function(e){if(n.canEmitEvents){var i,r=e.target||e.srcElement;("radio"===r.type||"checkbox"===r.type||"SELECT"===r.tagName)&&(i=t.utils.getElementData(r),i.type=r.type,i.value=r.value,i.checked=r.checked,t.socket.emit(o,i))}else n.canEmitEvents=!0}},n.socketEvent=function(t){return function(e){if(!t.canSync(e,i))return!1;n.canEmitEvents=!1;var o=t.utils.getSingleElement(e.tagName,e.index);return o?("radio"===e.type&&(o.checked=!0),"checkbox"===e.type&&(o.checked=e.checked),"SELECT"===e.tagName&&(o.value=e.value),o):!1}}},{}],13:[function(t,e,n){"use strict";var o=t("./events").manager;n.plugins={scroll:t("./ghostmode.scroll"),clicks:t("./ghostmode.clicks"),forms:t("./ghostmode.forms"),location:t("./ghostmode.location")},n.init=function(t){for(var e in n.plugins)n.plugins[e].init(t,o)}},{"./events":7,"./ghostmode.clicks":8,"./ghostmode.forms":10,"./ghostmode.location":14,"./ghostmode.scroll":15}],14:[function(t,e,n){"use strict";var o="browser:location",i="ghostMode.location";n.canEmitEvents=!0,n.init=function(t){t.socket.on(o,n.socketEvent(t))},n.socketEvent=function(t){return function(e){return t.canSync(e,i)?void(e.path?n.setPath(e.path):n.setUrl(e.url)):!1}},n.setUrl=function(t){window.location=t},n.setPath=function(t){window.location=window.location.protocol+"//"+window.location.host+t}},{}],15:[function(t,e,n){"use strict";var o,i="scroll",r="ghostMode.scroll";n.canEmitEvents=!0,n.init=function(t,e){o=t.utils,e.addEvent(window,i,n.browserEvent(t)),t.socket.on(i,n.socketEvent(t))},n.socketEvent=function(t){return function(e){if(!t.canSync(e,r))return!1;var i=o.getScrollSpace();return n.canEmitEvents=!1,t.options&&t.options.scrollProportionally?window.scrollTo(0,i.y*e.position.proportional):window.scrollTo(0,e.position.raw)}},n.browserEvent=function(t){return function(){var e=n.canEmitEvents;e&&t.socket.emit(i,{position:n.getScrollPosition()}),n.canEmitEvents=!0}},n.getScrollPosition=function(){var t=o.getBrowserScrollPosition();return{raw:t,proportional:n.getScrollTopPercentage(t)}},n.getScrollPercentage=function(t,e){var n=e.x/t.x,o=e.y/t.y;return{x:n||0,y:o}},n.getScrollTopPercentage=function(t){var e=o.getScrollSpace(),i=n.getScrollPercentage(e,t);return i.y}},{}],16:[function(t,e,n){"use strict";var o,i,r,s,c=(t("./ghostmode.scroll"),["display: none","padding: 15px","font-family: sans-serif","position: fixed","font-size: 0.9em","z-index: 9999","right: 0px","top: 0px","border-bottom-left-radius: 5px","background-color: #1B2032","margin: 0","color: white","text-align: center"]);n.init=function(t){o=t,r=t.options;var e=c;r.notify.styles&&(e=r.notify.styles),i=document.createElement("DIV"),i.id="__bs_notify__",i.style.cssText=e.join(";"),document.getElementsByTagName("body")[0].appendChild(i);var s=n.watchEvent();return o.emitter.on("notify",s),o.socket.on("browser:notify",s),i},n.watchEvent=function(){return function(t){return"string"==typeof t?n.flash(t):void n.flash(t.message,t.timeout)}},n.getElem=function(){return i},n.getScrollTop=function(){return o.utils.getBrowserScrollPosition().y},n.flash=function(t,e){var o=n.getElem();return o?(o.innerHTML=t,o.style.display="block",s&&(clearTimeout(s),s=void 0),s=window.setTimeout(function(){o.style.display="none"},e||2e3),o):!1}},{"./ghostmode.scroll":15}],17:[function(t,e,n){"use strict";var o=window.___browserSync___||{};n.socket=o.socket||{emit:function(){},on:function(){}},n.getPath=function(){return window.location.pathname},n.emit=function(t,e){var o=n.socket;o&&o.emit&&(e.url=n.getPath(),o.emit(t,e))},n.on=function(t,e){n.socket.on(t,e)}},{}]},{},[1]);

@@ -6,5 +6,6 @@ var gulp = require("gulp");

var contribs = require('gulp-contribs');
var browserify = require('gulp-browserify');
var through2 = require('through2');
var rename = require('gulp-rename');
var browserify = require("browserify");
var source = require("vinyl-source-stream");

@@ -57,4 +58,6 @@ var testFiles = [

var stripDebug = function () {
var chunks = [];
return through2.obj(function (file, enc, cb) {
var string = file.contents.toString();
chunks.push(file);
var string = file._contents.toString();
var regex = /\/\*\*debug:start\*\*\/[\s\S]*\/\*\*debug:end\*\*\//g;

@@ -70,6 +73,12 @@ var stripped = string.replace(regex, "");

gulp.task('build-dist', function() {
// Single entry point to browserify
gulp.src('lib/index.js')
.pipe(browserify())
.pipe(gulp.dest('./dist'))
return browserify({entries: ["./lib/index.js"]})
.bundle()
.pipe(source("index.js"))
.pipe(gulp.dest('./dist'));
});
gulp.task("dist", ["build-dist"], function () {
return gulp.src(["dist/index.js"])
.pipe(stripDebug())

@@ -89,5 +98,7 @@ .pipe(uglify())

gulp.task("dev", ['build-dist'], function () {
gulp.watch(["lib/*.js", "test/client-new/**/*.js"], ['build-dist']);
gulp.watch(["lib/*.js", "test/client-new/**/*.js"], ['dist']);
});
gulp.task('default', ["lint-lib", "lint-test", "build-dist", "test"]);
gulp.task("build", ["dist"]);

@@ -34,2 +34,5 @@ "use strict";

exports.init = function (bs) {
if (bs.options.tagNames) {
options.tagNames = bs.options.tagNames;
}
exports.saveScroll(utils.getWindow(), utils.getDocument());

@@ -80,3 +83,3 @@ bs.socket.on("file:reload", exports.reload(bs));

var justUrl = /^[^\?]+(?=\?)/.exec(currentValue);
var justUrl = exports.getFilenameOnly(currentValue);

@@ -95,16 +98,14 @@ if (justUrl) {

var body = document.body;
setTimeout(function () {
if (!hiddenElem) {
hiddenElem = document.createElement("DIV");
body.appendChild(hiddenElem);
} else {
hiddenElem.style.display = "none";
hiddenElem.style.display = "block";
}
}, 200);
setTimeout(function () {
if (!hiddenElem) {
hiddenElem = document.createElement("DIV");
body.appendChild(hiddenElem);
} else {
hiddenElem.style.display = "none";
hiddenElem.style.display = "block";
}
}, 200);
return {

@@ -116,2 +117,6 @@ elem: elem,

exports.getFilenameOnly = function (url) {
return /^[^\?]+(?=\?)/.exec(url);
};
/**

@@ -118,0 +123,0 @@ * @param {BrowserSync} bs

@@ -50,3 +50,2 @@ "use strict";

/**debug:start**/

@@ -53,0 +52,0 @@ if (window.__karma__) {

{
"name": "browser-sync-client",
"description": "Client-side scripts for BrowserSync",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://github.com/shakyshane/browser-sync-client",

@@ -31,21 +31,23 @@ "author": {

"devDependencies": {
"gulp-karma": "0.0.4",
"gulp-jshint": "~1.4.0",
"browser-sync": "^2.1.1",
"browserify": "^8.1.3",
"chai": "~1.9.0",
"sinon": "~1.8.2",
"karma-mocha": "~0.1.1",
"karma-sinon": "~1.0.0",
"express": "^4.0.0",
"gulp": "^3.6.0",
"gulp-contribs": "0.0.2",
"gulp-jshint": "~1.4.0",
"gulp-karma": "0.0.4",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^0.2.1",
"karma-chrome-launcher": "^0.1.3",
"karma-coverage": "^0.2.1",
"karma-firefox-launcher": "^0.1.3",
"karma-html2js-preprocessor": "^0.1.0",
"gulp-browserify": "^0.5.0",
"gulp-uglify": "^0.2.1",
"gulp": "^3.6.0",
"karma-coverage": "^0.2.1",
"karma-chrome-launcher": "^0.1.3",
"express": "^4.0.0",
"gulp-rename": "^1.2.0",
"karma-mocha": "~0.1.1",
"karma-sinon": "~1.0.0",
"mocha": "^1.18.2",
"sinon": "~1.8.2",
"supertest": "^0.10.0",
"through2": "^0.4.1",
"supertest": "^0.10.0"
"vinyl-source-stream": "^1.0.0"
},

@@ -52,0 +54,0 @@ "keywords": [],

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc