Skip to content

Commit

Permalink
Fix Job Points Tooltip and show it on mobile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashank999 committed Aug 24, 2024
1 parent 4771330 commit a1877b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion extension/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
{ "message": "Avoid crashing the page when opening the torntools settings on some pages.", "contributor": "DeKleineKobini" },
{ "message": "Fix query selectors on the gym page after Torn's frontend update.", "contributor": "Kwack" },
{ "message": "Fix Cooldown End Times after Torn's frontend update.", "contributor": "TheFoxMan" },
{ "message": "Show the gym stat requirements per stat after switching gyms.", "contributor": "DeKleineKobini" }
{ "message": "Show the gym stat requirements per stat after switching gyms.", "contributor": "DeKleineKobini" },
{ "message": "Fix Job Points Tooltip and show it on mobile.", "contributor": "TheFoxMan" }
],
"changes": [{ "message": "Faction selection of a filter stays even when faction members do not exist in list.", "contributor": "TheFoxMan" }],
"removed": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
async function addJobPointsTooltip() {
await requireSidebar();

const jobIcon = await requireElement("#sidebarroot a[href*='/job']");
const jobIcon = await requireElement("#sidebarroot [class*='status-icons__'] a[href*='/job']");
jobIcon.addEventListener("mouseover", tooltipListener);
}

Expand All @@ -43,7 +43,7 @@

await sleep(200); // Tooltip transition duration from one icon's tooltip information to another icon's tooltip information

const tooltipEl = (await requireElement("body > [id*='floating-ui-']")).find("[class*='tooltip__']");
const tooltipEl = (await requireElement("body > div[id][data-floating-ui-portal]")).find("[class*='tooltip__']");
const tooltipBodyEl = tooltipEl.getElementsByTagName("p")[0];
const tooltipBodyText = tooltipBodyEl.textContent;

Expand Down

0 comments on commit a1877b2

Please sign in to comment.