From 5d45db8f8dd7236d064e96cf96d9731df0d76c42 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Tue, 12 Mar 2019 23:56:26 -0500 Subject: [PATCH] small refactor in js and added exit btn to friend info overlay --- onionr/static-data/www/friends/index.html | 1 + onionr/static-data/www/mail/mail.js | 5 ----- onionr/static-data/www/shared/misc.js | 5 +++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/onionr/static-data/www/friends/index.html b/onionr/static-data/www/friends/index.html index 8ddd77f9..8e38ac39 100755 --- a/onionr/static-data/www/friends/index.html +++ b/onionr/static-data/www/friends/index.html @@ -13,6 +13,7 @@
+
Name:
diff --git a/onionr/static-data/www/mail/mail.js b/onionr/static-data/www/mail/mail.js index 24a74602..302c84f6 100755 --- a/onionr/static-data/www/mail/mail.js +++ b/onionr/static-data/www/mail/mail.js @@ -304,11 +304,6 @@ for (var i = 0; i < document.getElementsByClassName('refresh').length; i++){ document.getElementsByClassName('refresh')[i].style.float = 'right' } -for (var i = 0; i < document.getElementsByClassName('closeOverlay').length; i++){ - document.getElementsByClassName('closeOverlay')[i].onclick = function(e){ - document.getElementById(e.target.getAttribute('overlay')).style.visibility = 'hidden' - } -} fetch('/friends/list', { headers: { diff --git a/onionr/static-data/www/shared/misc.js b/onionr/static-data/www/shared/misc.js index bdde2f84..3c960c8f 100755 --- a/onionr/static-data/www/shared/misc.js +++ b/onionr/static-data/www/shared/misc.js @@ -87,3 +87,8 @@ for(var i = 0; i < refreshLinks.length; i++) { } } +for (var i = 0; i < document.getElementsByClassName('closeOverlay').length; i++){ + document.getElementsByClassName('closeOverlay')[i].onclick = function(e){ + document.getElementById(e.target.getAttribute('overlay')).style.visibility = 'hidden' + } +} \ No newline at end of file