├── .gitignore ├── resources └── google-voice-icon-readme.png ├── LICENSE ├── counter.js └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /resources/google-voice-icon-readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taralika/google-voice-desktop/HEAD/resources/google-voice-icon-readme.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Anand Taralika 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /counter.js: -------------------------------------------------------------------------------- 1 | function updateBadgeCount() 2 | { 3 | var targetNodes = document.getElementsByClassName("navItemBadge"); 4 | 5 | var count = 0; 6 | for (var i = 0; i < targetNodes.length; ++i) 7 | { 8 | // ignore the unreads in spam 9 | // previousElementSibling is of class navItemLabel and has the name of the section in it (e.g., " Spam ") 10 | if (targetNodes[i].previousElementSibling.innerHTML.trim().toLowerCase().localeCompare("spam") == 0) 11 | { 12 | continue; 13 | } 14 | count += parseInt(targetNodes[i].innerHTML); 15 | } 16 | count /= 2; // because Google Voice has duplicate nodes for some reason 17 | 18 | var newTitle = "Voice" + (count > 0 ? " (" + count + ")" : ""); 19 | if (document.title !== newTitle) 20 | { 21 | document.title = newTitle; 22 | } 23 | } 24 | 25 | // Update the badge every 5 seconds 26 | setInterval(updateBadgeCount, 5000); 27 | 28 | // update the badge as user clicks in the app, because GV updates the title with selected item's phone number 29 | new MutationObserver(function(mutations) { 30 | updateBadgeCount(); 31 | }).observe( 32 | document.querySelector('title'), { 33 | subtree: true, 34 | characterData: true, 35 | childList: true 36 | } 37 | ); 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | UPDATE: If you came here to get a desktop version of Google Voice, then you're in the right place except this app is no longer being maintained actively (it may still work, but YMMV). The good news is that you can now (at least as of v92 of Chrome) make any website act as an app directly through Chrome: In Chrome on your PC/Mac, open the website e.g., voice.google.com then go to the browser menu (3 dots in top right), choose "More Tools" > "Create Shortcut" - Make sure to select "Open as window" - and now you'll get Voice to open in its own window like an app. Pin the icon to your desktop/task/app bar for quick access. Detailed instructions here: you don't need my app anymore. Just go to voice.google.com in Chrome and you can create a shortcut/app that opens in its own window and you can pin its shortcut/icon to your dock just like any app. Detailed instructions are here: https://www.hellotech.com/guide/for/how-to-create-a-desktop-shortcut-to-a-website 2 | 3 | # Google Voice Desktop 4 | Google Voice Desktop App (made with Nativefier) with functional badge counter and new icon. The badge counter shows total of all unread items (texts, calls, voicemails). If new item arrives, badge counter will auto increment. As items are read, badge counter will automatically decrement. If you have desktop notifications turned on in your Google Voice account settings, the app will send notifications to desktop as new items arrive. 5 | 6 | ![icon-counter](/resources/google-voice-icon-readme.png) 7 | 8 | ## Download 9 | [Latest release](https://github.com/taralika/google-voice-desktop/releases/latest) 10 | 11 | ## Build it yourself: 12 | ###### Pre-condition: 13 | 1. Install [Nativefier](https://github.com/jiahaog/nativefier/#installation) 14 | 2. Install [optional dependencies](https://github.com/jiahaog/nativefier/#optional-dependencies) 15 | 3. Install [librsvg](https://www.npmjs.com/package/librsvg) 16 | ###### Execute these commands: 17 | ``` 18 | wget https://upload.wikimedia.org/wikipedia/commons/7/78/Google_Voice_icon.svg 19 | rsvg-convert -h 1000 -w 1000 Google_Voice_icon.svg > Google_Voice_icon.png 20 | wget https://raw.githubusercontent.com/taralika/google-voice-desktop/master/counter.js 21 | nativefier --name "Voice" --icon Google_Voice_icon.png --user-agent "Mozilla/5.0 (Windows NT 10.0; rv:99.0) Gecko/20100101 Firefox/99.0" --counter --inject counter.js "https://voice.google.com/" 22 | ``` 23 | --------------------------------------------------------------------------------