Skip to content

Commit

Permalink
Adds click refresh to Positive Affirmations
Browse files Browse the repository at this point in the history
  • Loading branch information
Marak committed Feb 24, 2022
1 parent f22f001 commit 7db2a37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions desktop/apps/desktop.buddylist/desktop.buddylist.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,16 @@ desktop.buddylist.load = function desktopLoadBuddyList (params, next) {
$('#window_buddylist').css('left', 777);
$('#window_buddylist').css('top', 66);

let key = desktop.buddylist.positiveAffirmations[Math.floor(Math.random() * desktop.buddylist.positiveAffirmations.length)];
$('.positiveAffirmation').html(key)

function updatePositiveAffirmation () {
let key = desktop.buddylist.positiveAffirmations[Math.floor(Math.random() * desktop.buddylist.positiveAffirmations.length)];
$('.positiveAffirmation').html(key)
}
updatePositiveAffirmation();

$('.positiveAffirmation').on('click', function(){
updatePositiveAffirmation();
})

$('.sendMessageForm').on('submit', function(){
return false;
Expand Down
1 change: 1 addition & 0 deletions desktop/assets/css/desktop.css
Original file line number Diff line number Diff line change
Expand Up @@ -1166,4 +1166,5 @@ iframe {
text-align: center;
padding-right: 16px;
padding-top: 8px;
cursor: pointer;
}

0 comments on commit 7db2a37

Please sign in to comment.