Skip to content

Instantly share code, notes, and snippets.

@jeznag
Created January 25, 2025 23:24
Show Gist options
  • Save jeznag/9c13825338c209cd34af16d20ac7fbd2 to your computer and use it in GitHub Desktop.
Save jeznag/9c13825338c209cd34af16d20ac7fbd2 to your computer and use it in GitHub Desktop.
safe-gmail-and-cliq
// ==UserScript==
// @name Safe Gmail and Cliq
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide channels + messages
// @author You
// @match https://mail.google.com/*
// @match https://cliq.zoho.com.au/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=slack.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
const blockInboxCss = document.createElement('style');
blockInboxCss.id = 'block-inbox-css';
blockInboxCss.textContent = `
#safe-slack-sidebar-div {
width: 320px;
position: absolute;
font-size: 30px;
top: 50px;
left: 0;
background-color: black;
height: 100%;
z-index: 9999999999999;
color: white;
}
`;
document.body.appendChild(blockInboxCss);
let sidebarDiv = null;
function handleSlack() {
if (!sidebarDiv) {
sidebarDiv = document.createElement('div');
sidebarDiv.id = 'safe-slack-sidebar-div';
sidebarDiv.textContent = `No peeking`;
document.body.appendChild(sidebarDiv);
}
}
setInterval(() => {
if (location.href.includes('mail.google') ||
location.href.includes('cliq.zoho')) {
handleSlack();
}
}, 1000);
// Your code here...
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment