Last active
January 1, 2022 22:35
-
-
Save q00u/b1e23928a0b22df6eceff3d756ce6cae to your computer and use it in GitHub Desktop.
Hides GVoice Phone
This file contains 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 characters
// ==UserScript== | |
// @name GVoice Phone Hider | |
// @namespace https://gist.github.com/q00u | |
// @version 0.4 | |
// @description Adds toggle button for the third (unnecessary) column in Google Voice, until they fix it | |
// @author Phoenix G | |
// @match https://voice.google.com/u/* | |
// @icon https://www.google.com/s2/favicons?domain=voice.google.com | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js | |
// @grant GM_addStyle | |
// @grant GM_getResourceText | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const widthVal = $('gv-call-sidebar').width(); | |
$('gmat-nav-list').append(' <gv-call-toggle [phone-open]="ctrl.obs_isCallSidebarVisible" (toggle)="ctrl.toggleCallSidebar()" label="Toggle phone" aria-label="Toggle phone"><button class="root mat-button" mat-button><span class="mat-button-wrapper"><div class="buttonContent"><mat-icon class="icon mat-icon notranslate mat-icon-no-color" role="img" svgicon="unfold_less" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><path d="M20 15.08 16.92 12 20 8.92 18.59 7.5l-4.5 4.5 4.5 4.5zM4 8.92 7.08 12 4 15.08l1.41 1.42 4.5-4.5-4.5-4.5z"></path></svg></mat-icon></div></span></button></gv-call-toggle>'); | |
$('gv-call-toggle').click(function() { | |
var toggleWidth = $('gv-call-sidebar').width() == widthVal ? '1px' : `${widthVal}px`; | |
$('gv-call-sidebar').animate({ width: toggleWidth }); | |
}); | |
})(); | |
//Todo: Lots of cleanup, remember hide/show state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(Still no working tooltip)