Compare commits

...

2 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
854c954180 [gitignore] restore the old Git behavior for the default modules (#3968)
The pattern `modules` was too broad and prevented tracking files in
`modules/default/` despite the negation pattern. Changed to `modules/*`
to properly exclude only the content of the modules directory while
allowing the default modules to be tracked.

This issue was likely introduced during the cleanup in #3952.

Without this change there are now warn messages like this:

```bash
kristjan@debian:~/MagicMirror$ git add modules/default/compliments/compliments.js
The following paths are ignored by one of your .gitignore files:
modules
hint: Use -f if you really want to add them.
hint: Disable this message with "git config advice.addIgnoredFile false"
```
2025-11-19 11:40:53 +01:00
Samed Ozdemir
a52baa5874 [compliments] fix: duplicate query param "?" in compliments module refresh url (#3967)
Checks if `this.config.remoteFile.includes` already contains a `?`
- If it does, uses `&` to append the dummy parameter
- If it doesn't, uses `?` to start a new query string
2025-11-19 11:06:43 +01:00
3 changed files with 6 additions and 3 deletions

2
.gitignore vendored
View File

@@ -55,7 +55,7 @@ Temporary Items
.Trash-*
# Ignore all modules except the default modules.
modules
modules/*
!modules/default
# Ignore changes to the custom css files but keep the sample and main.

View File

@@ -37,6 +37,7 @@ planned for 2026-01-01
- [core] refactor: replace `XMLHttpRequest` with `fetch` in `translator.js` (#3950)
- [tests] migrate e2e tests to Playwright (#3950)
- [calendar] refactor: migrate CalendarFetcher to ES6 class and improve error handling (#3958)
- [gitignore] cleanup/simplify .gitignore (#3952, #3954, #3968)
### Fixed
@@ -47,6 +48,7 @@ planned for 2026-01-01
- fixed problems with daylight-saving-time in weather provider `openmeto` (#3930, #3931)
- [newsfeed] fixed header layout issue introduced with prettier njk linting (#3946)
- [weather] fixed windy icon not showing up in pirateweather (#3957)
- [compliments] fixed duplicate query param "?" when constructing refresh url (#3967)
### Updated

View File

@@ -214,8 +214,9 @@ Module.register("compliments", {
// we need to force the server to not give us the cached result
// create an extra property (ignored by the server handler) just so the url string is different
// that will never be the same, using the ms value of date
if (isRemote && this.config.remoteFileRefreshInterval !== 0) this.urlSuffix = `?dummy=${Date.now()}`;
//
if (isRemote && this.config.remoteFileRefreshInterval !== 0) {
this.urlSuffix = this.config.remoteFile.includes("?") ? `&dummy=${Date.now()}` : `?dummy=${Date.now()}`;
}
try {
const response = await fetch(url + this.urlSuffix);
return await response.text();