From 7db2a379646726bfb9126db027d1d767764b1c99 Mon Sep 17 00:00:00 2001 From: Marak Date: Thu, 24 Feb 2022 01:54:14 -0500 Subject: [PATCH] Adds click refresh to Positive Affirmations --- desktop/apps/desktop.buddylist/desktop.buddylist.js | 12 ++++++++++-- desktop/assets/css/desktop.css | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/desktop/apps/desktop.buddylist/desktop.buddylist.js b/desktop/apps/desktop.buddylist/desktop.buddylist.js index 397cb46..cc762ba 100644 --- a/desktop/apps/desktop.buddylist/desktop.buddylist.js +++ b/desktop/apps/desktop.buddylist/desktop.buddylist.js @@ -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; diff --git a/desktop/assets/css/desktop.css b/desktop/assets/css/desktop.css index d506cb6..11e2563 100755 --- a/desktop/assets/css/desktop.css +++ b/desktop/assets/css/desktop.css @@ -1166,4 +1166,5 @@ iframe { text-align: center; padding-right: 16px; padding-top: 8px; + cursor: pointer; } \ No newline at end of file