Skip to content

Instantly share code, notes, and snippets.

@y-ack
Last active February 14, 2019 01:25
Show Gist options
  • Save y-ack/3fb753edded1916b2c93044728afc972 to your computer and use it in GitHub Desktop.
Save y-ack/3fb753edded1916b2c93044728afc972 to your computer and use it in GitHub Desktop.
disables web Discord's fucking ctrl-' call shortcut and badly placed button so I can stop scaring pixel
// ==UserScript==
// @name stop_scaring_pixel
// @namespace lumage.smilebasicsource.com
// @include https://discordapp.com/*
// @version 3.0
// @grant none
// @run-at document-end
// ==/UserScript==
var style = window.document.createElement('link');
style.rel = 'stylesheet'; style.type = 'text/css';
// nice awful autogenerated markup, discord. this will almost certainly break before long and there's nothing I can do about it.
style.href = `data:text/css, div[class^=titleWrapper] div div:nth-of-type(2) > div:first-child:not([class*=search]),
[name=VideoCamera],
[name=Phone],
[class^=contextMenu] div[class^=itemGroup]:first-of-type div:nth-of-type(2) {
display: none;
}`
document.getElementsByTagName("head")[0].appendChild(style);
document.onkeydown = function(e){if(e.keyCode==222 && e.ctrlKey){e.preventDefault();e.stopPropagation();}}
// ==UserScript==
// @name stop_scaring_pixel
// @namespace lumage.smilebasicsource.com
// @include https://discordapp.com/*
// @version 2.5
// @grant none
// @run-at document-end
// ==/UserScript==
var style = window.document.createElement('link');
style.rel = 'stylesheet'; style.type = 'text/css';
// nice awful autogenerated markup, discord. this will almost certainly break before long and there's nothing I can do about it.
style.href = 'data:text/css, .titleWrapper-3Vi_wz > div > .horizontal-2BEEBe > div:first-of-type { display: none; }'
document.getElementsByTagName("head")[0].appendChild(style);
document.onkeydown = function(e){if(e.keyCode==222 && e.ctrlKey){e.preventDefault();e.stopPropagation();}}
// ==UserScript==
// @name stop_scaring_pixel
// @namespace lumage.smilebasicsource.com
// @include https://discordapp.com/*
// @version 1
// @grant none
// @run-at document-start
// ==/UserScript==
document.onkeydown = function(e){if(e.keyCode==222 && e.ctrlKey){e.preventDefault();e.stopPropagation();}}
var style = window.document.createElement('link');
style.rel = 'stylesheet'; style.type = 'text/css';
style.href = 'data:text/css, .private-channel-call-btns-wrapper { display: none; }'
document.getElementsByTagName("head")[0].appendChild(style);
// ==UserScript==
// @name stop_scaring_pixel
// @namespace lumage.smilebasicsource.com
// @include https://discordapp.com/*
// @version 3.2.0
// @grant none
// @run-at document-end
// ==/UserScript==
var style = window.document.createElement('link');
style.rel = 'stylesheet'; style.type = 'text/css';
style.href = `data:text/css, div[class*=headerBar] div:nth-of-type(2) > div:first-of-type {
pointer-events: none;
}
div[class*=headerBar] div:nth-of-type(2) div[class*=search] {
pointer-events: all;
}`
document.getElementsByTagName("head")[0].appendChild(style);
document.onkeydown = function(e){if(e.keyCode==222 && e.ctrlKey){e.preventDefault();e.stopPropagation();}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment