From 7096b4b571c8aa136899fbedd77a4c16f1bc21d1 Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 18 Sep 2023 21:47:54 +0200 Subject: [PATCH 1/2] move shared `modules/default/utils.js` file to index.html --- CHANGELOG.md | 1 + index.html | 1 + modules/default/clock/clock.js | 2 +- modules/default/weather/weather.js | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8616abaa61..94916921fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ _This release is scheduled to be released on 2023-10-01._ - Fix ipWhiteList test (#3179) - Fix newsfeed: Convert HTML entities, codes and tag in description (#3191) - Respect width/height (no fullscreen) if set in electronOptions (together with `fullscreen: false`) in `config.js` (#3174) +- Fix `Uncaught SyntaxError: Identifier 'getCorsUrl' has already been declared (at utils.js:1:1)` when using `clock` and `weather` module (#xxxx) ## [2.24.0] - 2023-07-01 diff --git a/index.html b/index.html index 501c1af5b0..b97124be10 100644 --- a/index.html +++ b/index.html @@ -46,6 +46,7 @@ + diff --git a/modules/default/clock/clock.js b/modules/default/clock/clock.js index 4345d20a49..c063d4dc88 100644 --- a/modules/default/clock/clock.js +++ b/modules/default/clock/clock.js @@ -38,7 +38,7 @@ Module.register("clock", { }, // Define required scripts. getScripts: function () { - return ["moment.js", "moment-timezone.js", "suncalc.js", this.file("../utils.js")]; + return ["moment.js", "moment-timezone.js", "suncalc.js"]; }, // Define styles. getStyles: function () { diff --git a/modules/default/weather/weather.js b/modules/default/weather/weather.js index 701e151622..57c91d7b07 100644 --- a/modules/default/weather/weather.js +++ b/modules/default/weather/weather.js @@ -62,7 +62,7 @@ Module.register("weather", { // Return the scripts that are necessary for the weather module. getScripts: function () { - return ["moment.js", this.file("../utils.js"), "weatherutils.js", "weatherobject.js", this.file("providers/overrideWrapper.js"), "weatherprovider.js", "suncalc.js", this.file(`providers/${this.config.weatherProvider.toLowerCase()}.js`)]; + return ["moment.js", "weatherutils.js", "weatherobject.js", this.file("providers/overrideWrapper.js"), "weatherprovider.js", "suncalc.js", this.file(`providers/${this.config.weatherProvider.toLowerCase()}.js`)]; }, // Override getHeader method. From 89fb44455a51bb7b41f83308e5ad966fef35a0df Mon Sep 17 00:00:00 2001 From: bugsounet Date: Mon, 18 Sep 2023 21:50:51 +0200 Subject: [PATCH 2/2] update ChangeLog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94916921fd..ab411fd19f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,7 @@ _This release is scheduled to be released on 2023-10-01._ - Fix ipWhiteList test (#3179) - Fix newsfeed: Convert HTML entities, codes and tag in description (#3191) - Respect width/height (no fullscreen) if set in electronOptions (together with `fullscreen: false`) in `config.js` (#3174) -- Fix `Uncaught SyntaxError: Identifier 'getCorsUrl' has already been declared (at utils.js:1:1)` when using `clock` and `weather` module (#xxxx) +- Fix `Uncaught SyntaxError: Identifier 'getCorsUrl' has already been declared (at utils.js:1:1)` when using `clock` and `weather` module (#3204) ## [2.24.0] - 2023-07-01