Created
April 5, 2020 14:49
-
-
Save chaoticryptidz/f171b664859fdb1be8afc434cafa5a79 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 New Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description try to take over the world! | |
// @author You | |
// @downloadURL https://gist.githubusercontent.com/NamedKitten/f171b664859fdb1be8afc434cafa5a79/raw/dd7646ed48c02256c91a9627270af57538b6d551/discord.js | |
// @match https://discordapp.com/* | |
// @require https://code.jquery.com/jquery-3.4.1.slim.min.js | |
// @grant none | |
// ==/UserScript== | |
//sidebar-2K8pFh | |
//chat-3bRxxu | |
(function() { | |
'use strict'; | |
console.log("h"); | |
function showChat() { | |
$(".chat-3bRxxu").css('display', "flex") | |
$(".sidebar-2K8pFh").css('width', "0px") | |
$(".guilds-1SWlCJ").css('width', "0px") | |
$(".guilds-1SWlCJ").css('display', "none") | |
$(".base-3dtUhz").css("left", "0px") | |
} | |
function hideChat() { | |
$(".chat-3bRxxu").css('display', "none") | |
$(".sidebar-2K8pFh").css('width', "1000px") | |
$(".guilds-1SWlCJ").css('width', "72px") | |
$(".guilds-1SWlCJ").css('display', "flex") | |
$(".base-3dtUhz").css("left", "72px") | |
} | |
window.addEventListener('click', function (evt) { | |
$(".channel-2QD9_O").click(function() { | |
if (!$(this).data( "addedHandler")) { | |
$(this).data( "addedHandler", true ); | |
$( this ).click(); | |
showChat(); | |
console.log("Hh") | |
} | |
}); | |
$(".name-3_Dsmg").click(function() { | |
if (!$(this).data( "addedHandler")) { | |
$(this).data( "addedHandler", true ); | |
showChat(); | |
$(this).click(); | |
console.log("Hh") | |
} | |
}); | |
if (evt.detail === 3) { | |
var chatHidden = $(".chat-3bRxxu").css('display') == "none" | |
if (chatHidden) { | |
// Re-show chat. | |
showChat() | |
} else { | |
// Hide chat | |
hideChat() | |
} | |
$(".channel-2QD9_O").css("max-width", "10000px") | |
$(".searchBar-6Kv8R2").css("display", "none") | |
$(".header-2o-2hj").css("display", "none") | |
$(".container-3baos1").css("display", "none") | |
} | |
}); | |
// Your code here... | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment