Compare commits

...

2 Commits

Author SHA1 Message Date
peshomir 9f8669c94c Merge branch 'main' of https://github.com/fxclient/FXclient 2024-08-03 22:22:20 +03:00
peshomir 3bba13ff51 Update v0.6.5.3 - Fix hovering tooltip not working on mobile 2024-08-03 22:22:01 +03:00
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
const fx_version = '0.6.5.2'; // FX Client Version const fx_version = '0.6.5.3'; // FX Client Version
const fx_update = 'Jul 21'; // FX Client Last Updated const fx_update = 'Aug 3'; // FX Client Last Updated
if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) { if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) {
var wins_counter = 0; var wins_counter = 0;
@ -498,7 +498,7 @@ const hoveringTooltip = new (function() {
let recentlyShown = false; let recentlyShown = false;
this.display = () => {}; // this gets populated by the modified game script this.display = () => {}; // this gets populated by the modified game script
this.canvasPixelScale = 1; this.canvasPixelScale = 1;
document.getElementById("canvasA").addEventListener("mousemove", e => { function handler(e) {
if (!settings.hoveringTooltip || !getVar("gameState") || recentlyShown) return; if (!settings.hoveringTooltip || !getVar("gameState") || recentlyShown) return;
recentlyShown = true; recentlyShown = true;
try { try {
@ -506,7 +506,9 @@ const hoveringTooltip = new (function() {
} catch (e) { console.error(e) } } catch (e) { console.error(e) }
// for better performance, reduce the tooltip display frequency to no more than once every 100 ms // for better performance, reduce the tooltip display frequency to no more than once every 100 ms
setTimeout(() => recentlyShown = false, 100); setTimeout(() => recentlyShown = false, 100);
}); }
document.getElementById("canvasA").addEventListener("mousemove", handler);
document.getElementById("canvasA").addEventListener("touchmove", handler);
}); });
var donationsTracker = new (function(){ var donationsTracker = new (function(){