Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve backward compatiability for safari #2

Merged
merged 1 commit into from
Jun 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

❤️ **Donate:** Enjoying MagicMirror²? [Please consider a donation!](https://magicmirror.builders/donate) With your help we can continue to improve the MagicMirror²

## [] -
### Changed
- Improves backwards compatibility for Safari < 11

## [2.11.0] - 2020-04-01

🚨 READ THIS BEFORE UPDATING 🚨
Expand Down
8 changes: 6 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var MM = (function() {
dom.appendChild(moduleHeader);

if (typeof module.getHeader() === "undefined" || module.getHeader() !== "") {
moduleHeader.style = "display: none;";
moduleHeader.style.display = "none;";
}

var moduleContent = document.createElement("div");
Expand Down Expand Up @@ -212,7 +212,11 @@ var MM = (function() {
contentWrapper[0].appendChild(newContent);

headerWrapper[0].innerHTML = newHeader;
headerWrapper[0].style = headerWrapper.length > 0 && newHeader ? undefined : "display: none;";
if (headerWrapper.length > 0 && newHeader) {
delete headerWrapper[0].style;
} else {
headerWrapper[0].style.display = "none";
}
};

/* hideModule(module, speed, callback)
Expand Down