38 lines
1.4 KiB
JavaScript
38 lines
1.4 KiB
JavaScript
/* BetterDiscordApp VoiceMode JavaScript
|
|
* Version: 1.0
|
|
* Author: Jiiks | http://jiiks.net
|
|
* Date: 25/10/2015 - 19:10
|
|
* https://github.com/Jiiks/BetterDiscordApp
|
|
*/
|
|
|
|
function VoiceMode() {
|
|
|
|
}
|
|
|
|
VoiceMode.prototype.obsCallback = function () {
|
|
var self = this;
|
|
if (settingsCookie["bda-gs-4"]) {
|
|
self.disable();
|
|
setTimeout(function () {
|
|
self.enable();
|
|
}, 300);
|
|
}
|
|
};
|
|
|
|
VoiceMode.prototype.enable = function () {
|
|
$(".scroller.guild-channels ul").first().css("display", "none");
|
|
$(".scroller.guild-channels header").first().css("display", "none");
|
|
$(".app.flex-vertical").first().css("overflow", "hidden");
|
|
$(".chat.flex-vertical.flex-spacer").first().css("visibility", "hidden").css("min-width", "0px");
|
|
$(".flex-vertical.channels-wrap").first().css("flex-grow", "100000");
|
|
$(".guild-header .btn.btn-hamburger").first().css("visibility", "hidden");
|
|
};
|
|
|
|
VoiceMode.prototype.disable = function () {
|
|
$(".scroller.guild-channels ul").first().css("display", "");
|
|
$(".scroller.guild-channels header").first().css("display", "");
|
|
$(".app.flex-vertical").first().css("overflow", "");
|
|
$(".chat.flex-vertical.flex-spacer").first().css("visibility", "").css("min-width", "");
|
|
$(".flex-vertical.channels-wrap").first().css("flex-grow", "");
|
|
$(".guild-header .btn.btn-hamburger").first().css("visibility", "");
|
|
}; |