Skip to content

Commit

Permalink
Hide Refills header in settings on mobiles.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashank999 committed Nov 30, 2023
1 parent 4df80c6 commit c9627f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
],
"changes": [
{ "message": "Load TT SVG logo before other files.", "contributor": "TheFoxMan" },
{ "message": "Optimize filter activity regexes.", "contributor": "TheFoxMan" }
{ "message": "Optimize filter activity regexes.", "contributor": "TheFoxMan" },
{ "message": "Hide Refills section header in settings on mobiles.", "contributor": "TheFoxMan" }
],
"removed": []
}
Expand Down
2 changes: 1 addition & 1 deletion extension/pages/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ <h2>
<label for="sidebar-cooldownEndTimes">Show the end time of cooldowns.</label>
</div>

<div class="header">Refills</div>
<div class="header no-mobile">Refills</div>
<div class="option no-mobile">
<input id="sidebar-highlightEnergy" type="checkbox" />
<label for="sidebar-highlightEnergy">Highlight energy when refill hasn't been used yet.</label>
Expand Down
3 changes: 1 addition & 2 deletions extension/pages/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1167,14 +1167,13 @@ async function setupPreferences(requireCleanup) {
//section
//div[contains(translate(@class, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), 'sections')]
//section
//div[contains(@class, 'header')][contains(translate(., 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '${searchFor}')]`,
//div[contains(@class, 'header')]${checkDevice().mobile ? "[not(contains(@class, 'no-mobile'))]" : ""}[contains(translate(., 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '${searchFor}')]`,
document,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
null
);
searchList.innerHTML = "";
// Sorry but there is no forEach method available. Had to use traditional loops.
if (searchResults.snapshotLength > 0) {
for (let i = 0; i < searchResults.snapshotLength; i++) {
const option = searchResults.snapshotItem(i);
Expand Down

0 comments on commit c9627f8

Please sign in to comment.