Skip to content

Commit b66c807

Browse files
committed
3.0.1
1 parent c63cab5 commit b66c807

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "livereload-js",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"main": "dist/livereload.js",
55
"homepage": "http://livereload.com",
66
"authors": [

dist/livereload.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = function (it) {
5353
};
5454

5555
},{}],6:[function(require,module,exports){
56-
var core = module.exports = { version: '2.6.5' };
56+
var core = module.exports = { version: '2.6.9' };
5757
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
5858

5959
},{}],7:[function(require,module,exports){
@@ -677,7 +677,7 @@ const {
677677
PROTOCOL_7
678678
} = require('./protocol');
679679

680-
const VERSION = "3.0.0";
680+
const VERSION = "3.0.1";
681681

682682
class Connector {
683683
constructor(options, WebSocket, Timer, handlers) {
@@ -999,8 +999,8 @@ class LiveReload {
999999
if ('LiveReloadOptions' in window) {
10001000
this.options = new Options();
10011001

1002-
for (let k of Object.keys(window['LiveReloadOptions'] || {})) {
1003-
const v = window['LiveReloadOptions'][k];
1002+
for (const k of Object.keys(window.LiveReloadOptions || {})) {
1003+
const v = window.LiveReloadOptions[k];
10041004
this.options.set(k, v);
10051005
}
10061006
} else {
@@ -1168,7 +1168,7 @@ class LiveReload {
11681168

11691169
const pluginsData = {};
11701170

1171-
for (let plugin of this.plugins) {
1171+
for (const plugin of this.plugins) {
11721172
var pluginData = (typeof plugin.analyze === 'function' ? plugin.analyze() : undefined) || {};
11731173
pluginsData[plugin.constructor.identifier] = pluginData;
11741174
pluginData.version = plugin.constructor.version;
@@ -1217,15 +1217,15 @@ class Options {
12171217
}
12181218

12191219
Options.extract = function (document) {
1220-
for (let element of Array.from(document.getElementsByTagName('script'))) {
1220+
for (const element of Array.from(document.getElementsByTagName('script'))) {
12211221
var m, src;
12221222

1223-
if ((src = element.src) && (m = src.match(new RegExp("^[^:]+://(.*)/z?livereload\\.js(?:\\?(.*))?$")))) {
1223+
if ((src = element.getAttribute('src')) && (m = src.match(new RegExp('^(?:[^:]+:)?//(.*)/z?livereload\\.js(?:\\?(.*))?$')))) {
12241224
var mm;
12251225
const options = new Options();
1226-
options.https = src.indexOf('https') === 0;
1226+
options.https = element.src.indexOf('https') === 0;
12271227

1228-
if (mm = m[1].match(new RegExp("^([^/:]+)(?::(\\d+))?(\\/+.*)?$"))) {
1228+
if (mm = m[1].match(new RegExp('^([^/:]+)(?::(\\d+))?(\\/+.*)?$'))) {
12291229
options.host = mm[1];
12301230

12311231
if (mm[2]) {
@@ -1234,7 +1234,7 @@ Options.extract = function (document) {
12341234
}
12351235

12361236
if (m[2]) {
1237-
for (let pair of m[2].split('&')) {
1237+
for (const pair of m[2].split('&')) {
12381238
var keyAndValue;
12391239

12401240
if ((keyAndValue = pair.split('=')).length > 1) {
@@ -1283,7 +1283,7 @@ class Parser {
12831283
let message;
12841284

12851285
if (!this.protocol) {
1286-
if (data.match(new RegExp("^!!ver:([\\d.]+)$"))) {
1286+
if (data.match(new RegExp('^!!ver:([\\d.]+)$'))) {
12871287
this.protocol = 6;
12881288
} else if (message = this._parseMessage(data, ['hello'])) {
12891289
if (!message.protocols.length) {
@@ -1401,10 +1401,10 @@ const pathFromUrl = function (url) {
14011401
} = splitUrl(url));
14021402

14031403
if (url.indexOf('file://') === 0) {
1404-
path = url.replace(new RegExp("^file://(localhost)?"), '');
1404+
path = url.replace(new RegExp('^file://(localhost)?'), '');
14051405
} else {
14061406
// http : // hostname :8080 /
1407-
path = url.replace(new RegExp("^([^:]+:)?//([^:/]+)(:\\d*)?/"), '/');
1407+
path = url.replace(new RegExp('^([^:]+:)?//([^:/]+)(:\\d*)?/'), '/');
14081408
} // decodeURI has special handling of stuff like semicolons, so use decodeURIComponent
14091409

14101410

@@ -1417,7 +1417,7 @@ const pickBestMatch = function (path, objects, pathFunc) {
14171417
score: 0
14181418
};
14191419

1420-
for (let object of objects) {
1420+
for (const object of objects) {
14211421
score = numberOfMatchingSegments(path, pathFunc(object));
14221422

14231423
if (score > bestMatch.score) {
@@ -1489,7 +1489,7 @@ class Reloader {
14891489
this.options.stylesheetReloadTimeout = 15000;
14901490
}
14911491

1492-
for (let plugin of Array.from(this.plugins)) {
1492+
for (const plugin of Array.from(this.plugins)) {
14931493
if (plugin.reload && plugin.reload(path, options)) {
14941494
return;
14951495
}
@@ -1533,7 +1533,7 @@ class Reloader {
15331533
}
15341534

15351535
if (this.document.querySelectorAll) {
1536-
for (let {
1536+
for (const {
15371537
selector,
15381538
styleNames
15391539
} of IMAGE_STYLES) {
@@ -1559,14 +1559,14 @@ class Reloader {
15591559
return;
15601560
}
15611561

1562-
for (let rule of Array.from(rules)) {
1562+
for (const rule of Array.from(rules)) {
15631563
switch (rule.type) {
15641564
case CSSRule.IMPORT_RULE:
15651565
this.reloadStylesheetImages(rule.styleSheet, path, expando);
15661566
break;
15671567

15681568
case CSSRule.STYLE_RULE:
1569-
for (let {
1569+
for (const {
15701570
styleNames
15711571
} of IMAGE_STYLES) {
15721572
this.reloadStyleImages(rule.style, styleNames, path, expando);
@@ -1582,11 +1582,11 @@ class Reloader {
15821582
}
15831583

15841584
reloadStyleImages(style, styleNames, path, expando) {
1585-
for (let styleName of styleNames) {
1585+
for (const styleName of styleNames) {
15861586
const value = style[styleName];
15871587

15881588
if (typeof value === 'string') {
1589-
const newValue = value.replace(new RegExp("\\burl\\s*\\(([^)]*)\\)"), (match, src) => {
1589+
const newValue = value.replace(new RegExp('\\burl\\s*\\(([^)]*)\\)'), (match, src) => {
15901590
if (pathsMatch(path, pathFromUrl(src))) {
15911591
return "url(".concat(this.generateCacheBustUrl(src, expando), ")");
15921592
} else {
@@ -1896,7 +1896,7 @@ const CustomEvents = require('./customevents');
18961896

18971897
const LiveReload = window.LiveReload = new (require('./livereload').LiveReload)(window);
18981898

1899-
for (let k in window) {
1899+
for (const k in window) {
19001900
if (k.match(/^LiveReloadPlugin/)) {
19011901
LiveReload.addPlugin(window[k]);
19021902
}

dist/livereload.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "livereload-js",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "LiveReload JS client - auto reload browser on changes",
55
"main": "dist/livereload.js",
66
"module": "src/startup.js",

0 commit comments

Comments
 (0)