From f1baf0900225ae92b437ae1d19d30122efd13ff1 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Tue, 25 Aug 2015 09:44:42 +0300 Subject: [PATCH] Refactor and emotemodule init --- bda/config.json | 19 +++++++++++++++++++ BetterDiscordApp.js => bda/index.js | 5 ++++- bda/modules/EmoteModule.js | 15 +++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 bda/config.json rename BetterDiscordApp.js => bda/index.js (74%) create mode 100644 bda/modules/EmoteModule.js diff --git a/bda/config.json b/bda/config.json new file mode 100644 index 0000000..2bb7167 --- /dev/null +++ b/bda/config.json @@ -0,0 +1,19 @@ +{ + "EmoteModule": { + "Twitch":{ + "EmoteData": "emotedata_twitch.json", + "EmoteUrlStart": "https://static-cdn.jtvnw.net/emoticons/v1/", + "EmoteUrlEnd": "/1.0" + }, + "FrankerFaceZ": { + "EmoteData": "emotedata_ffz.json", + "EmoteUrlStart": "https://cdn.frankerfacez.com/emoticon/", + "EmoteUrlEnd": "/1" + }, + "BetterTTV": { + "EmoteData": "", + "EmoteUrlStart": "", + "EmoteUrlEnd": "" + } + } +} \ No newline at end of file diff --git a/BetterDiscordApp.js b/bda/index.js similarity index 74% rename from BetterDiscordApp.js rename to bda/index.js index c9dfd87..5d32c32 100644 --- a/BetterDiscordApp.js +++ b/bda/index.js @@ -5,7 +5,8 @@ * https://github.com/Jiiks/BetterDiscordApp */ -var _helpers = require('./bda/helper.js'); +var _helpers = require('./helper.js'); +var _emoteModule = require('./modules/EmoteModule.js'); var _helper; var _mainWindow; var _version = "1.0.0"; @@ -19,6 +20,8 @@ function BetterDiscordApp(mainWindow) { function init() { _helper.log("v" + _version + " initialized."); _helper.injectStylesheet("https://raw.githubusercontent.com/Jiiks/BetterDiscordApp/master/css/main.css"); + _emoteModule = new _emoteModule.EmoteModule(_helper); + } exports.BetterDiscordApp = BetterDiscordApp; \ No newline at end of file diff --git a/bda/modules/EmoteModule.js b/bda/modules/EmoteModule.js new file mode 100644 index 0000000..925567f --- /dev/null +++ b/bda/modules/EmoteModule.js @@ -0,0 +1,15 @@ +/* BetterDiscordApp Emote Module aka TwitchCord + * Version: 1.0 + * Author: Jiiks | http://jiiks.net + * Date: 25/08/2015 - 09:33 + * https://github.com/Jiiks/BetterDiscordApp + */ + +var _helper; + +function EmoteModule(helper) { + _helper = helper; + _helper.log("Emotes Initialized"); +} + +exports.EmoteModule = EmoteModule; \ No newline at end of file