Skip to content

Commit

Permalink
Try to fix some devices issues
Browse files Browse the repository at this point in the history
  • Loading branch information
FANMixco committed Jul 30, 2024
1 parent 6a94b4b commit ba7c549
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/lib/devicedetector-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion js/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,15 @@ window.addEventListener('DOMContentLoaded', () => {
document.getElementById('superContainer').style.display = "block";

if (isFirstRun) {
dialogWelcome.showModal();
if ((deviceDetector.device === 'phone' && isTouchDevice()) || deviceDetector.device !== 'phone') {
dialogWelcome.showModal();
}
}

function isTouchDevice() {
return (('ontouchstart' in window) ||
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0));
}

if (window.innerHeight > window.innerWidth * 2 && window.matchMedia("(orientation: portrait)").matches) {
Expand Down
2 changes: 1 addition & 1 deletion js/timer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"dir": "ltr",
"lang": "da",
"name": "Toastmasters Timer Lite",
"version": "2.4.1.19",
"version": "2.4.1.20",
"scope": "https://tmtimer.federiconavarrete.com/",
"display": "standalone",
"display_override": [
Expand Down

0 comments on commit ba7c549

Please sign in to comment.