From 2b673e2e96c032fba4f64ee547672d6e900d4690 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Fri, 11 Dec 2015 02:09:59 +0200 Subject: [PATCH] HTML Loader --- js/main.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 457e52b..7b8337c 100644 --- a/js/main.js +++ b/js/main.js @@ -1087,7 +1087,6 @@ SettingsPanel.prototype.construct = function() { */ var _hash; - function Utils() { } @@ -1105,9 +1104,20 @@ Utils.prototype.getHash = function() { _hash = data.sha; emoteModule.getBlacklist(); }); - }; +Utils.prototype.loadHtml = function(html) { + var container = $("
", { + class: "bd-container" + }).appendTo("body"); + + //TODO Inject these in next core update + html = '//cdn.rawgit.com/Jiiks/BetterDiscordApp/' + _hash + '/html/' + html + '.html'; + + container.load(html); +}; + + /* BetterDiscordApp VoiceMode JavaScript * Version: 1.0 * Author: Jiiks | http://jiiks.net