Skip to content

Commit

Permalink
Google Voice recipe add darkmode.css, fix message counts (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
oc013 authored Nov 3, 2023
1 parent 1f2ef43 commit 48dcdaf
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 5 deletions.
161 changes: 161 additions & 0 deletions recipes/google-voice/darkmode.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
:root {
--dark-grey: rgb(24, 26, 27);
--dark-medium-grey: rgb(27, 30, 31);
--medium-grey: rgb(31, 34, 35);
--dark-green: rgb(23, 55, 53);
--grey: grey;
--light-medium-grey: rgb(140, 130, 115);
--light-grey: rgb(208, 204, 197);
--near-medium-white: rgb(192, 186, 178);
--near-white: rgb(232, 230, 227);
--basically-white: #EEE;
}

* {
transition: none !important;
animation: none !important;
filter: none !important;
-webkit-animation: none !important;
-moz-animation: none !important;
-o-animation: none !important;
-ms-animation: none !important;
}

::placeholder /* placeholder text */
{
color: var(--grey)!important;
}

::-webkit-scrollbar {
width: 8px!important;
}

::-webkit-scrollbar-thumb {
background: var(--medium-grey)!important;
}

::-webkit-scrollbar-thumb:hover {
background: var(--dark-green)!important;
}

html,
body,
input,
button,
label,
header, /* header bar */
.mat-drawer-container, /* side icons */
.gvMessagingView-thread-list, /* List of calls */
.gvMessagingView-conversationListWrap, /* list of messages */
.gvThreadDetails-messageListHeader, /* header when viewing a message */
.gvMessageListHeader-subtitle, /* subtitle in message header */
.gvThreadDetails-root, /* message view */
.gvVoicemailPlayer-content, /* visual voicemail view */
.gvCallSidebar-root, /* calling sidebar */
.gvSettingsView-settingsNavBar, /* settings sidebar */
.gvSettingsView-sections, /* settings body */
#contact-list, /* calling sidebar contacts */
.button, /* calling sidebar */
.caption, /* calling sidebar */
.dialpad-button-container, /* calling sidebar */
md-menu-content,
gv-availability-view,
.gvRecipientPicker-chipsWrap, /* selecting to: when sending new msg */
.gb_te, /* search box dropdown */
div.mat-mdc-select-panel, /* settings recharge notification amount */
.gvBillingView-header /* billing header */
{
background-color: var(--dark-grey)!important;
border-color: var(--light-medium-grey)!important;
color: var(--light-grey)!important;
}

.gvThreadItem-selected, /* messages list item */
.container, /* calls list items and also message text container */
.mat-mdc-menu-panel /* context menus */
{
background-color: var(--dark-grey)!important;
}

iframe,
header form, /* Main search bar */
header form input, /* Main search bar */
header form button, /* Main search bar */
.icon /* settings page icons */
{
background-color: var(--medium-grey)!important;
}

.mdc-list-item--activated,
.container.active, /* calls list items and also message text container */
.gvThreadItem-selected /* message list selected item */
{
background-color: var(--dark-green)!important;
}

.gvThreadItem-root:hover, /* messages list item */
.gvThreadItem-root:focus, /* messages list item */
.gvMessagingView-thread-list .container:hover /* calls list items */
{
background-color: var(--dark-medium-grey)!important;
}

.mat-divider {
border-color: var(--light-medium-grey)!important;
}

.bubble /* message bubble */
{
background-color: var(--dark-grey)!important;
color: var(--light-grey)!important;
border: 1px solid var(--light-medium-grey)!important;
}

input,
textarea,
header span[role="heading"],
.mat-icon, /* general icon override */
.navItemLabel, /* main nav labels */
.mdc-list-item__primary-text, /* settings nav items */
.mat-mdc-select, /* settings autorecharge text */
.grey-900, /* various bolded items */
.gvThreadItem-contacts, /* message list contact name */
.phone-number-details, /* calling sidebar label */
#contact-list ul li .info-container .name, /* calling sidebar contact list */
.gvThreadItem-contacts, /* contact name in message list */
.primary-text, /* call header name */
.title, /* receiving calls button */
.sectionTitle, /* settings title */
.internalHeader, /* settings sub title */
.header, /* settings sub title */
.device-label, /* settings devices */
.deviceLabel, /* settings devices */
.details .name /* settings greeting label */
{
color: var(--near-white)!important;
}

.status, /* various label text (message sender, timestamp etc) */
.gvThreadItem-root, /* message list text */
.container .thread-info,
.call-as-label, /* calling sidebar label */
#contact-list ul li .info-container .details,
.latest-item-details, /* call timestamp */
.secondary-text, /* call header subtext */
.subheader, /* settings sub sub title */
.internalSubheader, /* settings sub sub title */
.device-details, /* settings device number */
.deviceDetails, /* settings device number */
.no-devices, /* settings devices */
.notificationText /* settings web notifications */
{
color: var(--near-medium-white)!important;
}

div[aria-label^="Unread"] .thread-info, /* unread missed calls */
div[aria-label^="Unread"] .latest-item-details, /* unread missed calls */
.gvThreadItem-unread /* unread message */
{
color: var(--basically-white)!important;
font-weight: 900!important
}
3 changes: 1 addition & 2 deletions recipes/google-voice/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"id": "google-voice",
"name": "Google Voice",
"version": "0.6.1",
"version": "0.6.2",
"license": "MIT",
"repository": "https://github.com/BehindTheMath/franz-recipe-google-voice",
"config": {
"serviceURL": "https://voice.google.com/u/0/",
"message": "Google Voice gives you one number for all your phones, voicemail as easy as email, free US long distance, low rates on international calls, and many calling features like transcripts, call blocking, call screening, conference calling, SMS, and more."
Expand Down
6 changes: 3 additions & 3 deletions recipes/google-voice/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ module.exports = Ferdium => {
count = Ferdium.safeParseInt(el.textContent.replaceAll(/[ ()]/gi, ''));
} else {
const countMessages = parseQuery(
'gv-nav-tab[tooltip="Messages"] div[aria-label="Unread count"]',
'mat-nav-list a[gv-test-id="sidenav-messages"] span.navItemBadge',
);
const countCalls = parseQuery(
'gv-nav-tab[tooltip="Calls"] div[aria-label="Unread count"]',
'mat-nav-list a[gv-test-id="sidenav-calls"] span.navItemBadge',
);
const countVoicemails = parseQuery(
'gv-nav-tab[tooltip="Voicemail"] div[aria-label="Unread count"]',
'mat-nav-list a[gv-test-id="sidenav-voicemail"] span.navItemBadge',
);
count = countMessages + countCalls + countVoicemails;
}
Expand Down

0 comments on commit 48dcdaf

Please sign in to comment.