Skip to content

Instantly share code, notes, and snippets.

@Rahul-RB
Last active May 7, 2020 17:50
Show Gist options
  • Select an option

  • Save Rahul-RB/104faead7e0f8273f1d552e42f077689 to your computer and use it in GitHub Desktop.

Select an option

Save Rahul-RB/104faead7e0f8273f1d552e42f077689 to your computer and use it in GitHub Desktop.
Remove Google Meet link in Gmail Sidebar
/* Install TamperMonkey
* Click on extension, create new script
* Copy paste the script from line 6 till end.
* Enjoy!
*/
// ==UserScript==
// @name Remove Google Meet link in Gmail Sidebar
// @namespace https://github.com/Rahul-RB
// @version 0.1
// @description Remove the annoyingly large "Meet" links on sidebar of your gmail.
// @author Rahul R Bharadwaj
// @match https://mail.google.com/*
// @grant none
// @license MIT
// @copyright 2020, Rahul-RB (https://openuserjs.org/users/Rahul-RB)
// @updateURL https://openuserjs.org/meta/Rahul-RB/Remove_Google_Meet_link_in_Gmail_Sidebar.meta.js
// @downloadURL https://openuserjs.org/install/Rahul-RB/Remove_Google_Meet_link_in_Gmail_Sidebar.user.js
// ==/UserScript==
window.addEventListener('load', function() {
'use strict';
var k = document.getElementsByTagName("a");
var p = null;
for(var i=0;i<k.length;i++){
if(k[i].textContent == "Start a meeting")
p=k[i];
}
function findUpTag(el) {
while (el.parentNode) {
el = el.parentNode;
for(var i=0; i<el.childNodes.length; i++){
if(el.childNodes[i].textContent !== undefined && el.childNodes[i].textContent.includes("Meet") && el.childNodes[i].textContent != "Start a meeting" && el.childNodes[i].textContent != "Join a meeting")
return el.childNodes[i];
}
}
return null;
}
if(p!==null && p!==undefined){
findUpTag(p).parentNode.remove();
}
else{
console.log("Unable to find the mail links");
}
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment