Skip to content

Commit

Permalink
Black magic...bloody vibrations
Browse files Browse the repository at this point in the history
  • Loading branch information
IGPenguin committed Nov 22, 2022
1 parent 06a05c2 commit 44ebd01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/random_quote.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ function celebrateSeeingItAll(){
function registerClickListeners(){
//Needed beacause onTouchEnd is used for mobile vibrations instead of onclick
var eventType;
if (navigator.userAgentData.mobile){
eventType = 'touchend';
} else {
if (!(navigator.userAgentData.mobile)){
eventType = 'click';
} else {
eventType = 'touchend';
}
document.getElementById('button_previous').addEventListener(eventType, previousItem);
document.getElementById('button').addEventListener(eventType, randomItem);
Expand Down

0 comments on commit 44ebd01

Please sign in to comment.