-
-
Save mhaylock/e592a2145d585a806c68 to your computer and use it in GitHub Desktop.
Revisions
-
mhaylock revised this gist
Jun 8, 2015 . 1 changed file with 58 additions and 35 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,45 +17,68 @@ Some Caveats: TODO: Update count on item removal / read. */ function loadScript(url, onload) { var element = document.createElement('script'); element.type = 'text/javascript'; element.src = url; element.onload = onload; document.getElementsByTagName("head")[0].appendChild(element); } function onload() { window.fluid.dockBadge = ''; setTimeout(updateBadge, 5000); setInterval(updateBadge, 10000); function updateBadge() { // Inbox title will always be the first item in the D4 Class. It's shown and unshown depending on the selected folder (snoozed, etc) var inboxTabSpan = document.querySelector('[jsaction="global.navigate_and_refresh"]'), inboxTabTitle = '', inboxTabStyle = 'display: none;'; if (inboxTabSpan) { inboxTabTitle = inboxTabSpan.getAttribute('title'); inboxTabStyle = inboxTabSpan.getAttribute('style'); } if (inboxTabStyle === 'display: none;') { // Inbox hidden. window.fluid.dockBadge = '?'; } else { //Check for Inbox Zero Sunrise Image var inboxZero = $('.j'); if (inboxZero.length >= 1) { window.fluid.dockBadge = ''; } else { // Inbox visible var allEmails = $('.scroll-list-item'); var unreadEmails = allEmails.find('div:contains("Unread"):not(:has(*)):visible'); var count = 0; unreadEmails.each(function ($row) { }); ///////////////////////////// // allEmails.length = ALL EMAILS IN INBOX // OR // unreadEmails.length = ONLY UNREAD ITEMS IN INBOX var count = unreadEmails.length; ///////////////////////////// if (count >= 1) { window.fluid.dockBadge = count; } else { window.fluid.dockBadge = ''; } } } } } if (typeof window.jQuery === 'undefined') { loadScript('//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js', onload); } else { onload(); } -
mhaylock revised this gist
Mar 18, 2015 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,9 +23,13 @@ setInterval(updateBadge, 10000); function updateBadge() { // Inbox title will always be the first item in the D4 Class. It's shown and unshown depending on the selected folder (snoozed, etc) var inboxTabSpan = document.querySelector('[jsaction="global.navigate_and_refresh"] > span:first-child'), inboxTabTitle = '', inboxTabStyle = 'display: none;'; if (inboxTabSpan) { inboxTabTitle = inboxTabSpan.getAttribute('title'); inboxTabStyle = inboxTabSpan.getAttribute('style'); } if (inboxTabStyle === 'display: none;') { // Inbox hidden. -
mhaylock revised this gist
Mar 18, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ setInterval(updateBadge, 10000); function updateBadge() { // Inbox title will always be the first item in the D4 Class. It's shown and unshown depending on the selected folder (snoozed, etc) var inboxTabSpan = document.querySelector('[jsaction="global.navigate_and_refresh"] > span:first-child'); var inboxTabTitle = inboxTabSpan.getAttribute('title'); var inboxTabStyle = inboxTabSpan.getAttribute('style'); @@ -37,7 +37,7 @@ function updateBadge() { window.fluid.dockBadge = ''; } else { // Inbox visible var unreadEmails = document.getElementsByClassName('qu'); var totalEmails = document.getElementsByClassName('scroll-list-item'); ///////////////////////////// -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function updateBadge() { // Inbox hidden. window.fluid.dockBadge = '?'; } else { //Check for Inbox Zero Sunrise Image var inboxZero = document.getElementsByClassName('j'); if (inboxZero.length >= 1) { window.fluid.dockBadge = ''; -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 20 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,6 @@ Some Caveats: TODO: Update count on item removal / read. */ window.fluid.dockBadge = ''; setTimeout(updateBadge, 5000); setInterval(updateBadge, 10000); @@ -32,21 +31,27 @@ function updateBadge() { // Inbox hidden. window.fluid.dockBadge = '?'; } else { //Check for Inbox Zero var inboxZero = document.getElementsByClassName('j'); if (inboxZero.length >= 1) { window.fluid.dockBadge = ''; } else { // Inbox visible var unreadEmails = document.getElementsByClassName('bX oD'); var totalEmails = document.getElementsByClassName('scroll-list-item'); ///////////////////////////// // totalEmails.length = ALL EMAILS IN INBOX // OR // unreadEmails.length = ONLY UNREAD ITEMS IN INBOX var count = unreadEmails.length; ///////////////////////////// if (count >= 1) { window.fluid.dockBadge = count; } else { window.fluid.dockBadge = ''; } } } } -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function updateBadge() { // Inbox hidden. window.fluid.dockBadge = '?'; } else { // Inbox visible var unreadEmails = document.getElementsByClassName('bX oD'); var totalEmails = document.getElementsByClassName('scroll-list-item'); -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,7 +40,7 @@ function updateBadge() { // totalEmails.length = ALL EMAILS IN INBOX // OR // unreadEmails.length = ONLY UNREAD ITEMS IN INBOX var count = unreadEmails.length; ///////////////////////////// if (count >= 1) { -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function updateBadge() { var inboxTabTitle = inboxTabSpan.getAttribute('title'); var inboxTabStyle = inboxTabSpan.getAttribute('style'); if (inboxTabStyle === 'display: none;') { // Inbox hidden. window.fluid.dockBadge = '?'; } else { -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function updateBadge() { var inboxTabTitle = inboxTabSpan.getAttribute('title'); var inboxTabStyle = inboxTabSpan.getAttribute('style'); if (inboxTabStyle == 'display: none;') { // Inbox hidden. window.fluid.dockBadge = '?'; } else { @@ -37,9 +37,9 @@ function updateBadge() { var totalEmails = document.getElementsByClassName('scroll-list-item'); ///////////////////////////// // totalEmails.length = ALL EMAILS IN INBOX // OR // unreadEmails.length = ONLY UNREAD ITEMS IN INBOX var count = totalEmails.length; ///////////////////////////// -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,8 +19,8 @@ TODO: Update count on item removal / read. */ window.fluid.dockBadge = ''; setTimeout(updateBadge, 5000); setInterval(updateBadge, 10000); function updateBadge() { // Inbox title will always be the first item in the D4 Class. It's shown and unshown depending on the selected folder (snoozed, etc) -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,8 +19,8 @@ TODO: Update count on item removal / read. */ window.fluid.dockBadge = ''; setTimeout(updateBadge, 2500); setInterval(updateBadge, 5000); function updateBadge() { // Inbox title will always be the first item in the D4 Class. It's shown and unshown depending on the selected folder (snoozed, etc) @@ -40,11 +40,11 @@ function updateBadge() { // totalEmails = ALL EMAILS IN INBOX // OR // unreadEmails = ONLY UNREAD ITEMS IN INBOX var count = totalEmails.length; ///////////////////////////// if (count >= 1) { window.fluid.dockBadge = count; } else { window.fluid.dockBadge = ''; } -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Includes options for total badge count and unread badge count. Some Caveats: - This doesn't update the badge unless it's looking at the inbox. - The workaround is to only show the badge count when the inbox tab is active, otherwise it shows '?' as a reminder on other tabs (snoozed, etc). - No idea how well this works with more than one tab open. TODO: Update count on item removal / read. */ -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Includes options for total badge count and unread badge count. Some Caveats: - This doesn't update the badge unless it's looking at the inbox. - The workaround is to only show the badge count when the inbox tab is active, otherwise it shows '?' as a reminder on other tabs (snoozed, etc). TODO: Update count on item removal / read. */ -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function updateBadge() { var inboxTabStyle = inboxTabSpan.getAttribute('style'); if (inboxTabStyle == "display: none;") { // Inbox hidden. window.fluid.dockBadge = '?'; } else { // Inbox visible. -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Some Caveats: TODO: Update count on item removal / read. */ window.fluid.dockBadge = ''; setTimeout(updateBadge, 5000); setInterval(updateBadge, 10000); -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ /* This is a FluidApp userscript for Google Inbox for Mac. Includes options for total badge count and unread badge count. 1) You need the paid version of FluidApp (http://fluidapp.com/) -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,10 +17,10 @@ Some Caveats: TODO: Update count on item removal / read. */ window.fluid.dockBadge = ''; setTimeout(updateBadge, 5000); setInterval(updateBadge, 10000); function updateBadge() { // Inbox title will always be the first item in the D4 Class. It's shown and unshown depending on the selected folder (snoozed, etc) var inboxTabSpan = document.getElementsByClassName('d4')[0].getElementsByTagName('span')[0]; var inboxTabTitle = inboxTabSpan.getAttribute('title'); -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,11 +27,10 @@ function updateDockBadge() { var inboxTabStyle = inboxTabSpan.getAttribute('style'); if (inboxTabStyle == "display: none;") { // Inbox hidden, don't scrape. (Kind of shitty solution, yeah.) window.fluid.dockBadge = '?'; } else { // Inbox visible. var unreadEmails = document.getElementsByClassName('bX oD'); var totalEmails = document.getElementsByClassName('scroll-list-item'); -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function updateDockBadge() { var count = totalEmails; ///////////////////////////// if (count >= 1) { window.fluid.dockBadge = count.length; } else { window.fluid.dockBadge = ''; -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,15 +35,12 @@ function updateDockBadge() { var unreadEmails = document.getElementsByClassName('bX oD'); var totalEmails = document.getElementsByClassName('scroll-list-item'); ///////////////////////////// // totalEmails = ALL EMAILS IN INBOX // OR // unreadEmails = ONLY UNREAD ITEMS IN INBOX var count = totalEmails; ///////////////////////////// if (count) { window.fluid.dockBadge = count.length; -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Includes options for total badge count and unread badge count. Some Caveats: - This doesn't update the badge unless it's looking at the inbox. - The workaround is to only show the badge count when looking at the inbox, otherwise it shows '?' as a reminder. TODO: Update count on item removal / read. */ -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,8 +7,8 @@ Includes options for total badge count and unread badge count. 4) Go to window -> userscript and add click the plus sign under the first table (on the left). Name the item 'Inbox'. 5) In the second table (on the right) click the plus and type in "*inbox.google.com*". 6) Paste the contents of this document into the script area below that. 7) Configure badge count (for total or unread only) in the code below. 8) Refresh your FluidApp. (CMD + R) Some Caveats: - This doesn't update the badge unless it's looking at the inbox. -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Includes options for total badge count and unread badge count. 3) Set the user-agent to Chrome 4) Go to window -> userscript and add click the plus sign under the first table (on the left). Name the item 'Inbox'. 5) In the second table (on the right) click the plus and type in "*inbox.google.com*". 6) Paste the contents of this document into the script area below that. 7) Configure badge count (for total or unread only in the code below). 8) Refresh your FluidApp. -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ /* This is a FluidApp userscript for Google Inbox on the desktop. Includes options for total badge count and unread badge count. 1) You need the paid version of FluidApp (http://fluidapp.com/) 2) Point Fluid to https://inbox.google.com (I recommend the icon from here: https://medium.com/@chrismessina/create-an-icon-for-google-inbox-in-your-dock-ed269312e3bc) 3) Set the user-agent to Chrome 4) Go to window -> userscript and add click the plus sign under the first table (on the left). Name the item 'Inbox'. -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ /* This is a FluidApp userscript for Google Inbox on the desktop. Includes options for total badge count and unread badge count. 1) You need the paid version of FluidApp 2) Point Fluid to https://inbox.google.com (I recommend the icon from here: https://medium.com/@chrismessina/create-an-icon-for-google-inbox-in-your-dock-ed269312e3bc) 3) Set the user-agent to Chrome -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ /* This is a FluidApp userscript for Google Inbox on the desktop. Includes options for total badge count and unread badge count. 1) You need the paid version of FluidApp 2) Point Fluid to https://inbox.google.com (I recommend the icon from here: https://medium.com/@chrismessina/create-an-icon-for-google-inbox-in-your-dock-ed269312e3bc) 3) Set the user-agent to Chrome -
aaronn revised this gist
Nov 21, 2014 . 1 changed file with 13 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,16 @@ /* This is a FluidApp userscript for Google Inbox on the desktop. 1) You need the paid version of FluidApp 2) Point Fluid to https://inbox.google.com (I recommend the icon from here: https://medium.com/@chrismessina/create-an-icon-for-google-inbox-in-your-dock-ed269312e3bc) 3) Set the user-agent to Chrome 4) Go to window -> userscript and add click the plus sign under the first table (on the left). Name the item 'Inbox'. 5) In the second table (on the right) click the plus and type in "*inbox.google.com*". 6) Paste this document into the script area below that. 7) Configure badge count (for total or unread only in the code below). 8) Refresh your FluidApp. Some Caveats: - This doesn't update the badge unless it's looking at the inbox. - The workaround is to only show the badge count when looking at the inbox, otherwise it shows '?' TODO: Update count on item removal / read. */ -
aaronn renamed this gist
Nov 21, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
aaronn created this gist
Nov 21, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ /* This doesn't update the badge unless it's looking at the inbox. The workaround is to only show the badge count when looking at the inbox, otherwise it shows a 'Go To Inbox' message. The idea here is it's better to show an explicitly 'bad count' than a wrong count if it's sitting in the dock for a while and you're expecting an email. TODO: Update count on item removal / read. */ window.fluid.dockBadge = ''; setTimeout(updateDockBadge, 3000); setInterval(updateDockBadge, 15000); function updateDockBadge() { // Inbox title will always be the first item in the D4 Class. It's shown and unshown depending on the selected folder (snoozed, etc) var inboxTabSpan = document.getElementsByClassName('d4')[0].getElementsByTagName('span')[0]; var inboxTabTitle = inboxTabSpan.getAttribute('title'); var inboxTabStyle = inboxTabSpan.getAttribute('style'); if (inboxTabStyle == "display: none;") { // If the first item isn't being shown we know that inbox is hidden-- so we should reset the badge to remind the user to swap it out. // Kind of shitty solution, yeah. window.fluid.dockBadge = '?'; } else { // We know the user has the inbox visible so we can start scraping for the badge count. var unreadEmails = document.getElementsByClassName('bX oD'); var totalEmails = document.getElementsByClassName('scroll-list-item'); // CUSTOMIZE HERE ///////////////////////////// ///////////////////////////// // totalEmails = ALL EMAILS IN INBOX // OR // unreadEmails = ONLY UNREAD ITEMS IN INBOX var count = totalEmails; ///////////////////////////// ///////////////////////////// if (count) { window.fluid.dockBadge = count.length; } else { window.fluid.dockBadge = ''; } } }