Skip to content

Commit

Permalink
Avoid crashing the page when opening the torntools settings on some p…
Browse files Browse the repository at this point in the history
…ages. (#804)

* Avoid crashing the page when opening the torntools settings on some pages.

* Avoid crashing the page when opening the torntools settings on some pages.
  • Loading branch information
DeKleineKobini authored Aug 23, 2024
1 parent 9592091 commit 749d6fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"date": false,
"logs": {
"features": [],
"fixes": [],
"fixes": [{ "message": "Avoid crashing the page when opening the torntools settings on some pages.", "contributor": "DeKleineKobini" }],
"changes": [{ "message": "Faction selection of a filter stays even when faction members do not exist in list.", "contributor": "TheFoxMan" }],
"removed": []
}
Expand Down
4 changes: 2 additions & 2 deletions extension/scripts/features/settings-link/ttSettingsLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
});
const tornContent = document.find(".content-wrapper[role*='main']");

tornContent.style.display = "none";
tornContent.style.visibility = "hidden";
tornContent.insertAdjacentElement("afterend", returnToTorn);
tornContent.insertAdjacentElement("afterend", ttSettingsIframe);
document.body.classList.add("tt-align-left");
returnToTorn.addEventListener("click", () => {
document.getElementById("saveSettingsBar")?.remove();
returnToTorn.remove();
ttSettingsIframe.remove();
tornContent.style.display = "block";
tornContent.style.visibility = "";
document.body.classList.remove("tt-align-left");
});
});
Expand Down

0 comments on commit 749d6fd

Please sign in to comment.