diff --git a/js/settingspanel.js b/js/settingspanel.js
new file mode 100644
index 0000000..b67adf0
--- /dev/null
+++ b/js/settingspanel.js
@@ -0,0 +1,88 @@
+/* BetterDiscordApp Settings Panel JavaScript
+ * Version: 1.1
+ * Author: Jiiks | http://jiiks.net
+ * Date: 26/08/2015 - 11:54
+ * Last Update: 26/08/2015 - 12:35
+ * https://github.com/Jiiks/BetterDiscordApp
+ */
+
+function SettingsPanel() {
+
+}
+
+SettingsPanel.prototype.getPanel = function() {
+ return this.tcSettingsPanel;
+}
+
+SettingsPanel.prototype.init = function() {
+
+ var self = this;
+ this.tcSettingsPanel = $("
", { id: "tc-settings-panel" });
+ this.getPanel().append($("", { id: "tc-settings-panel-header" }).append($("", { text: "BetterDiscord - Settings" })).append($("", { id: "tc-settings-close", text: "X", style:"cursor:pointer;" })));
+
+ var settingsList = $("");
+ this.getPanel().append($("", { id: "tc-settings-panel-body" }).append(settingsList));
+
+ $.each(settings, function(key, value) {
+ var son = "tc-switch-on";
+ var sof = "tc-switch-off";
+
+ if(cookie[value.id]) {
+ son = "tc-switch-on active";
+ }else {
+ sof = "tc-switch-off active";
+ }
+ settingsList.append($("").append($("", { text: key})).append($("", { text: " - " + value.info })).append($("", { class: "tc-switch", id: value.id }).append($("", { class: sof, text: "OFF" })).append($("", { class: son, text: "ON" }))));
+ })
+
+ var settingsFooter = $("", { id: "tc-settings-panel-footer" });
+ settingsFooter.append($("", { id: "tc-about", text: "BetterDiscord v" + version + " by Jiiks | Settings are automatically saved." } ));
+ var tcLinks = $("", { id: "tc-links" });
+ $.each(links, function(key, value) {
+ tcLinks.append($("", { href: value, text: key }));
+ tcLinks.append($("", { text: " | " }));
+ })
+ settingsFooter.append(tcLinks);
+ this.getPanel().append(settingsFooter);
+
+
+ $("body").append(this.getPanel());
+ $("#tc-settings-close").on("click", function(e) { self.show(); });
+ $(".tc-switch").on("click", function() { self.handler($(this)) });
+}
+
+
+SettingsPanel.prototype.show = function() {
+ this.getPanel().toggle();
+ $("#tc-settings-li").removeClass();
+ if(this.getPanel().is(":visible")) {
+ $("#tc-settings-li").addClass("active");
+ }
+}
+
+
+SettingsPanel.prototype.handler = function(e){
+ var sid = e.attr("id");
+ var enabled = settingsCookie[sid];
+ enabled = !enabled;
+ settingsCookie[sid] = enabled;
+
+ var swoff = $("#" + sid + " .tc-switch-off");
+ var swon = $("#" + sid + " .tc-switch-on");
+ swoff.removeClass("active");
+ swon.removeClass("active");
+
+ if(enabled) {
+ swon.addClass("active");
+ } else {
+ swoff.addClass("active");
+ }
+
+ $.cookie("better-discord", JSON.stringify(settingsCookie));
+
+ if(settingsCookie["bda-es-qme"]) {
+ $("#twitchcord-button-container").show();
+ } else {
+ $("#twitchcord-button-container").hide();
+ }
+}
\ No newline at end of file