From a81836a42fa1b35b07cb7aad2a86d5057a61b27b Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 17 Dec 2015 13:46:25 +0100 Subject: Only load the big (128x128) avatar on the perosnal page Before the code was executed on every page if a user was logged in. Now only on the personal page. Thus saving a request on all other pages. --- settings/js/personal.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'settings/js') diff --git a/settings/js/personal.js b/settings/js/personal.js index 8362adac2a6..b90194b90ec 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -405,6 +405,11 @@ $(document).ready(function () { if ($('#sslCertificate > tbody > tr').length === 0) { $('#sslCertificate').hide(); } + + // Load the big avatar + if (oc_config.enable_avatars) { + $('#avatar .avatardiv').avatar(OC.currentUser, 128); + } }); if (!OC.Encryption) { -- cgit v1.2.3