Replace voicemode width with flex-grow
This commit is contained in:
parent
e93db396f3
commit
8ee0b97c00
15
js/main.js
15
js/main.js
|
@ -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", "");
|
||||
};
|
Loading…
Reference in New Issue