Voice only mode
This commit is contained in:
parent
32110e8c9c
commit
9c3169d80f
|
@ -14,7 +14,7 @@
|
|||
* --Voice mode
|
||||
*/
|
||||
|
||||
var settingsPanel, emoteModule, utils, quickEmoteMenu, opublicServers;
|
||||
var settingsPanel, emoteModule, utils, quickEmoteMenu, opublicServers, voiceMode;
|
||||
var jsVersion = 1.3;
|
||||
|
||||
var mainObserver;
|
||||
|
@ -63,6 +63,7 @@ Core.prototype.init = function() {
|
|||
utils = new Utils();
|
||||
emoteModule = new EmoteModule();
|
||||
quickEmoteMenu = new QuickEmoteMenu();
|
||||
voideMode = new VoiceMode();
|
||||
|
||||
emoteModule.init();
|
||||
emoteModule.autoCapitalize();
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* --Voice mode
|
||||
*/
|
||||
|
||||
var settingsPanel, emoteModule, utils, quickEmoteMenu, opublicServers;
|
||||
var settingsPanel, emoteModule, utils, quickEmoteMenu, opublicServers, voiceMode;
|
||||
var jsVersion = 1.3;
|
||||
|
||||
var mainObserver;
|
||||
|
@ -63,6 +63,7 @@ Core.prototype.init = function() {
|
|||
utils = new Utils();
|
||||
emoteModule = new EmoteModule();
|
||||
quickEmoteMenu = new QuickEmoteMenu();
|
||||
voideMode = new VoiceMode();
|
||||
|
||||
emoteModule.init();
|
||||
emoteModule.autoCapitalize();
|
||||
|
@ -566,6 +567,10 @@ SettingsPanel.prototype.init = function() {
|
|||
} else {
|
||||
$("body").removeClass("bd-minimal-chan");
|
||||
}
|
||||
|
||||
if(settingsCookie["bda-gs-4"]) {
|
||||
voiceMode.enable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -617,10 +622,47 @@ SettingsPanel.prototype.handler = function(e){
|
|||
} else {
|
||||
$("#bd-pub-li").hide();
|
||||
}
|
||||
if(settingsCookie["bda-gs-4"]){
|
||||
voideMode.enable();
|
||||
} else {
|
||||
voiceMode.disable();
|
||||
}
|
||||
|
||||
mainCore.saveSettings();
|
||||
}
|
||||
|
||||
/* 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.enable = function() {
|
||||
$($(".scroller.guild-channels ul")[0]).css("display", "none");
|
||||
$($(".scroller.guild-channels header")[0]).css("display", "none");
|
||||
$($(".flex-horizontal.flex-spacer")[0]).css("overflow", "hidden");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("visibility", "hidden");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("min-width", "0px");
|
||||
$($(".flex-vertical.channels-wrap")[0]).css("width", "100%");
|
||||
$($(".guild-header .btn.btn-hamburger")[0]).css("visibility", "hidden");
|
||||
|
||||
}
|
||||
|
||||
VoiceMode.prototype.disable = function() {
|
||||
$($(".scroller.guild-channels ul")[0]).css("display", "");
|
||||
$($(".scroller.guild-channels header")[0]).css("display", "");
|
||||
$($(".flex-horizontal.flex-spacer")[0]).css("overflow", "");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("visibility", "");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("min-width", "");
|
||||
$($(".flex-vertical.channels-wrap")[0]).css("width", "");
|
||||
$($(".guild-header .btn.btn-hamburger")[0]).css("visibility", "");
|
||||
}
|
||||
|
||||
/* BetterDiscordApp Utilities JavaScript
|
||||
* Version: 1.0
|
||||
* Author: Jiiks | http://jiiks.net
|
||||
|
|
|
@ -69,6 +69,10 @@ SettingsPanel.prototype.init = function() {
|
|||
} else {
|
||||
$("body").removeClass("bd-minimal-chan");
|
||||
}
|
||||
|
||||
if(settingsCookie["bda-gs-4"]) {
|
||||
voiceMode.enable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -120,6 +124,11 @@ SettingsPanel.prototype.handler = function(e){
|
|||
} else {
|
||||
$("#bd-pub-li").hide();
|
||||
}
|
||||
if(settingsCookie["bda-gs-4"]){
|
||||
voideMode.enable();
|
||||
} else {
|
||||
voiceMode.disable();
|
||||
}
|
||||
|
||||
mainCore.saveSettings();
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
/* 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.enable = function() {
|
||||
$($(".scroller.guild-channels ul")[0]).css("display", "none");
|
||||
$($(".scroller.guild-channels header")[0]).css("display", "none");
|
||||
$($(".flex-horizontal.flex-spacer")[0]).css("overflow", "hidden");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("visibility", "hidden");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("min-width", "0px");
|
||||
$($(".flex-vertical.channels-wrap")[0]).css("width", "100%");
|
||||
$($(".guild-header .btn.btn-hamburger")[0]).css("visibility", "hidden");
|
||||
|
||||
}
|
||||
|
||||
VoiceMode.prototype.disable = function() {
|
||||
$($(".scroller.guild-channels ul")[0]).css("display", "");
|
||||
$($(".scroller.guild-channels header")[0]).css("display", "");
|
||||
$($(".flex-horizontal.flex-spacer")[0]).css("overflow", "");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("visibility", "");
|
||||
$($(".chat.flex-vertical.flex-spacer")[0]).css("min-width", "");
|
||||
$($(".flex-vertical.channels-wrap")[0]).css("width", "");
|
||||
$($(".guild-header .btn.btn-hamburger")[0]).css("visibility", "");
|
||||
}
|
Loading…
Reference in New Issue