startBrowserSync.js
function monkeyPatch() {
	var script = function() {
		window.__karma__ = true;
		(function patch() {
			if (typeof window.__bs === 'undefined') {
				window.setTimeout(patch, 500);
			} else {
				var oldCanSync = window.__bs.prototype.canSync;
				window.__bs.prototype.canSync = function(data, optPath) {
					data.url = window.location.pathname.substr(0, window.location.pathname.indexOf('/www')) + data.url.substr(data.url.indexOf('/www'))
					return oldCanSync.apply(this, [data, optPath]);
				};
			}
		}());
	};
	return '<script>(' + script.toString() + '());</script>';
}
function monkeyPatch() {
	var script = function() {
		window.__karma__ = true;
		(function patch() {
			if (typeof window.__bs === 'undefined') {
				window.setTimeout(patch, 500);
			} else {
				var oldCanSync = window.__bs.prototype.canSync;
				window.__bs.prototype.canSync = function(data, optPath) {
					data.url = window.location.pathname.substr(0, window.location.pathname.indexOf('/www')) + data.url.substr(data.url.indexOf('/www'))
					return oldCanSync.apply(this, [data, optPath]);
				};
			}
		}());
	};
	return '<script>(' + script.toString() + '());</script>';
}
function monkeyPatch ( ) { var script = function ( ) { window . __karma__ = true ; ( function patch ( ) { if ( typeof window . __bs === 'undefined' ) { window . setTimeout ( patch , 500 ) ; } else { var oldCanSync = window . __bs . prototype . canSync ; window . __bs . prototype . canSync = function ( data , optPath ) { data . url = window . location . pathname . substr ( 0 , window . location . pathname . indexOf ( '/www' ) ) + data . url . substr ( data . url . indexOf ( '/www' ) ) return oldCanSync . apply ( this , [ data , optPath ] ) ; } ; } } ( ) ) ; } ; return '<script>(' + script . toString ( ) + '());</script>' ; }
Private function that adds the code snippet to deal with reloading
files when they are served from platform folders
Private function that adds the code snippet to deal with reloading files when they are served from platform folders