2015-10-26 06:27:55 +01:00
|
|
|
/* BetterDiscordApp VoiceMode JavaScript
|
|
|
|
* Version: 1.0
|
|
|
|
* Author: Jiiks | http://jiiks.net
|
|
|
|
* Date: 25/10/2015 - 19:10
|
|
|
|
* https://github.com/Jiiks/BetterDiscordApp
|
|
|
|
*/
|
|
|
|
|
|
|
|
function VoiceMode() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-04-10 14:43:27 +02:00
|
|
|
VoiceMode.prototype.obsCallback = function () {
|
2015-12-16 12:21:46 +01:00
|
|
|
var self = this;
|
2016-04-10 14:43:27 +02:00
|
|
|
if (settingsCookie["bda-gs-4"]) {
|
2015-12-16 12:21:46 +01:00
|
|
|
self.disable();
|
2016-04-10 14:43:27 +02:00
|
|
|
setTimeout(function () {
|
2015-12-16 12:21:46 +01:00
|
|
|
self.enable();
|
|
|
|
}, 300);
|
|
|
|
}
|
2016-04-10 14:43:27 +02:00
|
|
|
};
|
2015-12-16 12:21:46 +01:00
|
|
|
|
2016-04-10 14:43:27 +02:00
|
|
|
VoiceMode.prototype.enable = function () {
|
2015-10-26 06:27:55 +01:00
|
|
|
$(".scroller.guild-channels ul").first().css("display", "none");
|
|
|
|
$(".scroller.guild-channels header").first().css("display", "none");
|
2015-12-16 12:21:46 +01:00
|
|
|
$(".app.flex-vertical").first().css("overflow", "hidden");
|
2015-10-26 06:27:55 +01:00
|
|
|
$(".chat.flex-vertical.flex-spacer").first().css("visibility", "hidden").css("min-width", "0px");
|
2015-12-16 12:21:46 +01:00
|
|
|
$(".flex-vertical.channels-wrap").first().css("flex-grow", "100000");
|
2015-10-26 06:27:55 +01:00
|
|
|
$(".guild-header .btn.btn-hamburger").first().css("visibility", "hidden");
|
|
|
|
};
|
|
|
|
|
2016-04-10 14:43:27 +02:00
|
|
|
VoiceMode.prototype.disable = function () {
|
2015-10-26 06:27:55 +01:00
|
|
|
$(".scroller.guild-channels ul").first().css("display", "");
|
|
|
|
$(".scroller.guild-channels header").first().css("display", "");
|
2015-12-16 12:21:46 +01:00
|
|
|
$(".app.flex-vertical").first().css("overflow", "");
|
2015-10-26 06:27:55 +01:00
|
|
|
$(".chat.flex-vertical.flex-spacer").first().css("visibility", "").css("min-width", "");
|
2015-12-16 12:21:46 +01:00
|
|
|
$(".flex-vertical.channels-wrap").first().css("flex-grow", "");
|
2015-10-26 06:27:55 +01:00
|
|
|
$(".guild-header .btn.btn-hamburger").first().css("visibility", "");
|
2016-04-10 14:43:27 +02:00
|
|
|
};
|