Skip to content

Commit

Permalink
Fix mobile mode on v4
Browse files Browse the repository at this point in the history
  • Loading branch information
hwatson381 committed Feb 16, 2024
1 parent 635d4e4 commit 2bb33bc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion snake-web-initial.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ function switchToMobile() {
snakeContainer.dataset.isMobile = '';

//Delete fullscreen button
document.querySelector('img[src$="fullscreen_white_24dp.png"]').remove();
let fullscreenButtonOld = document.querySelector('img[src$="fullscreen_white_24dp.png"]')
if(fullscreenButtonOld) {
fullscreenButtonOld.remove();
}

let fullscreenButtonsNew = document.querySelectorAll('div.EFcTud[jsaction="zeJAAd"]');
if(fullscreenButtonsNew.length > 0) {
[...fullscreenButtonsNew].forEach(button => button.remove());
}

//Add styles needed for mobile
let css = `
Expand Down

0 comments on commit 2bb33bc

Please sign in to comment.