Replace voicemode width with flex-grow

This commit is contained in:
Jiiks 2015-10-31 23:30:51 +02:00
parent e93db396f3
commit 8ee0b97c00
1 changed files with 2 additions and 13 deletions

View File

@ -143,7 +143,6 @@ Core.prototype.initObserver = function() {
if(mutation.target.getAttribute('class') != null) {
if(mutation.target.getAttribute('class').indexOf("titlebar") != -1) {
quickEmoteMenu.obsCallback();
voiceMode.obsCallback();
}
}
emoteModule.obsCallback(mutation);
@ -720,23 +719,13 @@ function VoiceMode() {
}
VoiceMode.prototype.obsCallback = function() {
var self = this;
if(settingsCookie["bda-gs-4"]) {
self.disable();
setTimeout(function() {
self.enable();
}, 200);
}
}
VoiceMode.prototype.enable = function() {
$(".scroller.guild-channels ul").first().css("display", "none");
$(".scroller.guild-channels header").first().css("display", "none");
$(".flex-vertical.flex-spacer").first().css("overflow", "hidden");
$(".chat.flex-vertical.flex-spacer").first().css("visibility", "hidden").css("min-width", "0px");
$(".flex-vertical.channels-wrap").first().css("width", "100%");
$(".flex-vertical.channels-wrap").first().css("flex-grow", "100000");
$(".guild-header .btn.btn-hamburger").first().css("visibility", "hidden");
};
@ -745,6 +734,6 @@ VoiceMode.prototype.disable = function() {
$(".scroller.guild-channels header").first().css("display", "");
$(".flex-vertical.flex-spacer").first().css("overflow", "");
$(".chat.flex-vertical.flex-spacer").first().css("visibility", "").css("min-width", "");
$(".flex-vertical.channels-wrap").first().css("width", "");
$(".flex-vertical.channels-wrap").first().css("flex-grow", "");
$(".guild-header .btn.btn-hamburger").first().css("visibility", "");
};