Skip to content

Commit

Permalink
Fix #6. Use the hostname from the browser.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmustiata committed May 10, 2017
1 parent a662f34 commit cec136a
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 27 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Check the [documentation](doc/Client_Configuration.md) for full details.

## Change Log

* v2.7.6 2017-05-10 *BugFix* Use the host name from the browser. Thaks `tvanekeris`.
* v2.7.5 2017-02-23 *BugFix* Keep the right page on iframe reload.
* v2.7.4 2017-01-30 *BugFix* Don't die if a client dies, and doesn't updates sockets.
* v2.7.3 2017-01-18 *BugFix* Whoops, wrong copy of environment still. Minor fix. Executable lib file, so the module can be linked with `npm link`.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fast-live-reload",
"version": "2.7.5",
"version": "2.7.6",
"homepage": "https://github.com/bmustiata/fast-live-reload",
"authors": [
"Bogdan Mustiata <bogdan.mustiata@gmail.com>"
Expand Down
10 changes: 6 additions & 4 deletions client/client-fast-reload.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/client-fast-reload.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions iframe/fast-live-reload/js/client-reload.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion iframe/fast-live-reload/js/client-reload.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions iframe/fast-live-reload/js/iframe-reload.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion iframe/fast-live-reload/js/iframe-reload.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"email": "becirb@gmail.com"
}
],
"version": "2.7.5",
"version": "2.7.6",
"dependencies": {
"chalk": "1.0.0",
"cookie-parser": "1.3.4",
Expand Down
10 changes: 6 additions & 4 deletions src/client/update-notifier.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* UpdateNotifier - Notifies when updates were reported by the server.
* @param {string} clientHost The client host to connect to in order to wait for updates.
* @param {string} defaultHost The client host to connect to in order to wait for updates.
* @param {function} callback
* @return {void}
*/
function UpdateNotifier(clientHost, callback) {
this._clientHost = clientHost || "localhost:9001";
function UpdateNotifier(defaultHost, callback) {
this._defaultHost = defaultHost;
this.callback = callback;
}

Expand Down Expand Up @@ -35,7 +35,9 @@ UpdateNotifier.prototype.requestUpdatesFromServer = function() {
queryParams = new ParameterParser(queryString);
hashParams = new ParameterParser(hashString);

host = window.fastLiveReloadHost ? window.fastLiveReloadHost : this._clientHost;
host = hostString + ':9001';
host = this._defaultHost ? this._defaultHost : host;
host = window.fastLiveReloadHost ? window.fastLiveReloadHost : host;
host = queryParams.get("fastLiveReloadHost", host);
host = hashParams.get("fastLiveReloadHost", host);

Expand Down
10 changes: 6 additions & 4 deletions tmp/client-fast-reload.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tmp/client-fast-reload.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion versions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fast-live-reload:
version: 2.7.5
version: 2.7.6
files:
package.json: '"version": "**VERSION**",'
bower.json: '"version": "**VERSION**",'
Expand Down

0 comments on commit cec136a

Please sign in to comment.