Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
added disconnect voice on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
pohky committed Apr 7, 2016
1 parent 51c7eda commit aecb700
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/main.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var settings = {
"Override Default Emotes": { "id": "bda-es-5", "info": "Override default emotes", "implemented": false, "hidden": false},
"Show Names": { "id": "bda-es-6", "info": "Show emote names on hover", "implemented": true, "hidden": false},
"Show emote modifiers": { "id": "bda-es-8", "info": "Enable/Disable emote mods", "implemented": true, "hidden": false},
"Disconnect Voice on exit": { "id": "bda-dc-0", "info": "", "implemented": true, "hidden": false},
"Custom css live update": { "id": "bda-css-0", "info": "", "implemented": true, "hidden": true },
"Custom css auto udpate": { "id": "bda-css-1", "info": "", "implemented": true, "hidden": true }
};
Expand Down Expand Up @@ -63,6 +64,7 @@ var defaultCookie = {
"bda-es-8": true,
"bda-jd": true,
"bda-es-8": true,
"bda-dc-0": false,
"bda-css-0": false,
"bda-css-1": false
};
Expand Down Expand Up @@ -169,7 +171,13 @@ Core.prototype.init = function () {
$("#tc-settings-button").on("click", function () {
settingsPanel.show();
});


window.addEventListener("beforeunload", function(){
if(settingsCookie["bda-dc-0"]){
$('.btn.btn-disconnect').click();
}
});

opublicServers.init();

emoteModule.autoCapitalize();
Expand Down

0 comments on commit aecb700

Please sign in to comment.