Skip to content

Commit

Permalink
Merge pull request #21 from noriyotcp/debugging-on-mobile
Browse files Browse the repository at this point in the history
debugging on mobile
  • Loading branch information
noriyotcp authored Oct 4, 2024
2 parents c94937c + a82cf45 commit 6f92681
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/js/detectOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export function detectOS() {
}

// Detect iOS
if (/iphone|ipad|ipod/.test(userAgent)) {
if (/iphone|ipad|ipod/i.test(userAgent)) {
return "iOS";
}

// Detect Android
if (/android/.test(userAgent)) {
if (/android/i.test(userAgent)) {
return "Android";
}

Expand Down
3 changes: 2 additions & 1 deletion assets/js/hotkeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ document.addEventListener("DOMContentLoaded", function () {
}

// For debugging purpose
if (isMobile()) {
const isMobileDevice = isMobile();
if (isMobileDevice) {
const siteSubTitle = document.querySelector(".site-subtitle");
siteSubTitle.innerHTML = "Noriyo Akita's Today I Learned (on Mobile)"
}
Expand Down

0 comments on commit 6f92681

Please sign in to comment.