From 4addde782e8d79e6ac1a964af4fb9197f74d3dfb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 15 Aug 2017 21:38:08 -0700 Subject: put unseen network count in page title; hubzilla issue #843 --- view/js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/main.js b/view/js/main.js index f928fa377..f20432735 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -272,6 +272,7 @@ var last_filestorage_id = null; var mediaPlaying = false; var contentHeightDiff = 0; var liveRecurse = 0; +var savedTitle = ''; $(function() { $.ajaxSetup({cache: false}); @@ -401,11 +402,13 @@ function NavUpdate() { if(data.network == 0) { data.network = ''; $('.net-update, .net-button').hide(); + document.title = savedTitle; } else { $('.net-update, .net-button').show(); + document.title = '(' + data.network + ') ' + savedTitle; } $('.net-update').html(data.network); - + if(data.pubs == 0) { data.pubs = ''; $('.pubs-update, .pubs-button').hide(); @@ -1384,6 +1387,8 @@ $(document).ready(function() { numbers : aStr['t17'], }; + savedTitle = document.title; + }); function zFormError(elm,x) { -- cgit v1.2.3