Version info 1.58

This commit is contained in:
Jiiks 2016-04-02 10:14:20 +03:00
parent 78c7860c6c
commit 8047b953d1
2 changed files with 8 additions and 27 deletions

View File

@ -1,12 +1,12 @@
/* BetterDiscordApp Core JavaScript
* Version: 1.52
* Version: 1.53
* Author: Jiiks | http://jiiks.net
* Date: 27/08/2015 - 16:36
* Last Update: 24/010/2015 - 17:27
* Last Update: 02/04/2016
* https://github.com/Jiiks/BetterDiscordApp
*/
var settingsPanel, emoteModule, utils, quickEmoteMenu, opublicServers, voiceMode, pluginModule, themeModule;
var jsVersion = 1.57;
var jsVersion = 1.58;
var supportedVersion = "0.2.5";
var mainObserver;
@ -63,27 +63,8 @@ var defaultCookie = {
var bdchangelog = {
"changes": {
"api": {
"title": "Api Functions!",
"text": "New api events!",
"img": ""
},
"dec": {
"title": "Decorations&Snow!",
"text": "Decorations and snow have been removed.",
"img": ""
}
},
"fixes": {
"emotes": {
"title": "Sub emotes!",
"text": "Discord sub emotes are now replaced by BetterDiscord sub emotes and can be favorited!",
"img": ""
}
},
"upcoming": {
"ignore": {
"title": "Ignore User!",
"text": "Ignore users you don't like!",
"title": "Emote modifiers!",
"text": "You can use the following modifiers to modify emotes: <br> <strong>spin</strong>, <strong>spin2</strong>, <strong>spin3</strong>, <strong>flip</strong>, <strong>pulse</strong>, <strong>spinflip</strong>. <br> Example usage: Kappa:spin",
"img": ""
}
}
@ -291,7 +272,7 @@ Core.prototype.constructChangelog = function () {
' <div class="modal-inner">' +
' <div id="bdcl" class="change-log"> ' +
' <div class="header">' +
' <strong>What\'s new in BetterDiscord JS v1.53&' + jsVersion + '</strong>' +
' <strong>What\'s new in BetterDiscord JS' + jsVersion + '</strong>' +
' <button class="close" onclick=\'$("#bd-wn-modal").remove();\'></button>' +
' </div><!--header-->' +
' <div class="scroller-wrap">' +

4
js/main.min.js vendored
View File

@ -1,11 +1,11 @@
var settingsPanel,emoteModule,utils,quickEmoteMenu,opublicServers,voiceMode,pluginModule,themeModule;var jsVersion=1.57;var supportedVersion="0.2.5";var mainObserver;var twitchEmoteUrlStart="https://static-cdn.jtvnw.net/emoticons/v1/";var twitchEmoteUrlEnd="/1.0";var ffzEmoteUrlStart="https://cdn.frankerfacez.com/emoticon/";var ffzEmoteUrlEnd="/1";var bttvEmoteUrlStart="https://cdn.betterttv.net/emote/";var bttvEmoteUrlEnd="/1x";var mainCore;var settings={"Save logs locally":{"id":"bda-gs-0","info":"Saves chat logs locally","implemented":false},"Public Servers":{"id":"bda-gs-1","info":"Display public servers button","implemented":true},"Minimal Mode":{"id":"bda-gs-2","info":"Hide elements and reduce the size of elements.","implemented":true},"Voice Mode":{"id":"bda-gs-4","info":"Only show voice chat","implemented":true},"Hide Channels":{"id":"bda-gs-3","info":"Hide channels in minimal mode","implemented":true},"Quick Emote Menu":{"id":"bda-es-0","info":"Show quick emote menu for adding emotes","implemented":true},"Show Emotes":{"id":"bda-es-7","info":"Show any emotes","implemented":true},"FrankerFaceZ Emotes":{"id":"bda-es-1","info":"Show FrankerFaceZ Emotes","implemented":true},"BetterTTV Emotes":{"id":"bda-es-2","info":"Show BetterTTV Emotes","implemented":true},"Emote Autocomplete":{"id":"bda-es-3","info":"Autocomplete emote commands","implemented":false},"Emote Auto Capitalization":{"id":"bda-es-4","info":"Autocapitalize emote commands","implemented":true},"Override Default Emotes":{"id":"bda-es-5","info":"Override default emotes","implemented":false},"Show Names":{"id":"bda-es-6","info":"Show emote names on hover","implemented":true}};var links={"Jiiks.net":{"text":"Jiiks.net","href":"http://jiiks.net","target":"_blank"},"twitter":{"text":"Twitter","href":"http://twitter.com/jiiksi","target":"_blank"},"github":{"text":"Github","href":"http://github.com/jiiks","target":"_blank"}};var defaultCookie={"version":jsVersion,"bda-gs-0":false,"bda-gs-1":true,"bda-gs-2":false,"bda-gs-3":false,"bda-gs-4":false,"bda-es-0":true,"bda-es-1":true,"bda-es-2":true,"bda-es-3":false,"bda-es-4":false,"bda-es-5":true,"bda-es-6":true,"bda-es-7":true,"bda-jd":true};var bdchangelog={"changes":{"api":{"title":"Api Functions!","text":"New api events!","img":""},"dec":{"title":"Decorations&Snow!","text":"Decorations and snow have been removed.","img":""}},"fixes":{"emotes":{"title":"Sub emotes!","text":"Discord sub emotes are now replaced by BetterDiscord sub emotes and can be favorited!","img":""}},"upcoming":{"ignore":{"title":"Ignore User!","text":"Ignore users you don't like!","img":""}}};var settingsCookie={};var bdaf=false;var bdafo=false;function Core(){}
var settingsPanel,emoteModule,utils,quickEmoteMenu,opublicServers,voiceMode,pluginModule,themeModule;var jsVersion=1.58;var supportedVersion="0.2.5";var mainObserver;var twitchEmoteUrlStart="https://static-cdn.jtvnw.net/emoticons/v1/";var twitchEmoteUrlEnd="/1.0";var ffzEmoteUrlStart="https://cdn.frankerfacez.com/emoticon/";var ffzEmoteUrlEnd="/1";var bttvEmoteUrlStart="https://cdn.betterttv.net/emote/";var bttvEmoteUrlEnd="/1x";var mainCore;var settings={"Save logs locally":{"id":"bda-gs-0","info":"Saves chat logs locally","implemented":false},"Public Servers":{"id":"bda-gs-1","info":"Display public servers button","implemented":true},"Minimal Mode":{"id":"bda-gs-2","info":"Hide elements and reduce the size of elements.","implemented":true},"Voice Mode":{"id":"bda-gs-4","info":"Only show voice chat","implemented":true},"Hide Channels":{"id":"bda-gs-3","info":"Hide channels in minimal mode","implemented":true},"Quick Emote Menu":{"id":"bda-es-0","info":"Show quick emote menu for adding emotes","implemented":true},"Show Emotes":{"id":"bda-es-7","info":"Show any emotes","implemented":true},"FrankerFaceZ Emotes":{"id":"bda-es-1","info":"Show FrankerFaceZ Emotes","implemented":true},"BetterTTV Emotes":{"id":"bda-es-2","info":"Show BetterTTV Emotes","implemented":true},"Emote Autocomplete":{"id":"bda-es-3","info":"Autocomplete emote commands","implemented":false},"Emote Auto Capitalization":{"id":"bda-es-4","info":"Autocapitalize emote commands","implemented":true},"Override Default Emotes":{"id":"bda-es-5","info":"Override default emotes","implemented":false},"Show Names":{"id":"bda-es-6","info":"Show emote names on hover","implemented":true}};var links={"Jiiks.net":{"text":"Jiiks.net","href":"http://jiiks.net","target":"_blank"},"twitter":{"text":"Twitter","href":"http://twitter.com/jiiksi","target":"_blank"},"github":{"text":"Github","href":"http://github.com/jiiks","target":"_blank"}};var defaultCookie={"version":jsVersion,"bda-gs-0":false,"bda-gs-1":true,"bda-gs-2":false,"bda-gs-3":false,"bda-gs-4":false,"bda-es-0":true,"bda-es-1":true,"bda-es-2":true,"bda-es-3":false,"bda-es-4":false,"bda-es-5":true,"bda-es-6":true,"bda-es-7":true,"bda-jd":true};var bdchangelog={"changes":{"api":{"title":"Emote modifiers!","text":"You can use the following modifiers to modify emotes: <br> <strong>spin</strong>, <strong>spin2</strong>, <strong>spin3</strong>, <strong>flip</strong>, <strong>pulse</strong>, <strong>spinflip</strong>. <br> Example usage: Kappa:spin","img":""}}};var settingsCookie={};var bdaf=false;var bdafo=false;function Core(){}
Core.prototype.init=function(){var self=this;if(version<supportedVersion){this.alert("Not Supported","BetterDiscord v"+version+"(your version)"+" is not supported by the latest js("+jsVersion+").<br><br> Please download the latest version from <a href='https://betterdiscord.net' target='_blank'>BetterDiscord.net</a>");return;}
utils=new Utils();var sock=new BdWSocket();sock.start();utils.getHash();emoteModule=new EmoteModule();quickEmoteMenu=new QuickEmoteMenu();voiceMode=new VoiceMode();emoteModule.init();this.initSettings();this.initObserver();function gwDefer(){console.log(new Date().getTime()+" Defer");if($(".guilds-wrapper .guilds").children().length>0){console.log(new Date().getTime()+" Defer Loaded");var guilds=$(".guilds>li:first-child");guilds.after($("<li></li>",{id:"bd-pub-li",css:{"height":"20px","display":settingsCookie["bda-gs-1"]==true?"":"none"}}).append($("<div/>",{class:"guild-inner",css:{"height":"20px","border-radius":"4px"}}).append($("<a/>").append($("<div/>",{css:{"line-height":"20px","font-size":"12px"},text:"public",id:"bd-pub-button"})))));var showChannelsButton=$("<button/>",{class:"btn",id:"bd-show-channels",text:"R",css:{"cursor":"pointer"},click:function(){settingsCookie["bda-gs-3"]=false;$("body").removeClass("bd-minimal-chan");self.saveSettings();}});$(".guilds-wrapper").prepend(showChannelsButton);opublicServers=new PublicServers();pluginModule=new PluginModule();pluginModule.loadPlugins();if(typeof(themesupport2)!=="undefined"){themeModule=new ThemeModule();themeModule.loadThemes();}
settingsPanel=new SettingsPanel();settingsPanel.init();quickEmoteMenu.init(false);$("#tc-settings-button").on("click",function(){settingsPanel.show();});$("#bd-pub-button").on("click",function(){opublicServers.show();});opublicServers.init();emoteModule.autoCapitalize();if(settingsCookie["version"]<jsVersion){var cl=self.constructChangelog();$("body").append(cl);settingsCookie["version"]=jsVersion;self.saveSettings();}
$("head").append("<style>.CodeMirror{ min-width:100%; }</style>");$("head").append('<style id="bdemotemenustyle"></style>');}else{setTimeout(gwDefer,100);}}
$(document).ready(function(){setTimeout(gwDefer,1000);});};Core.prototype.initSettings=function(){if($.cookie("better-discord")==undefined){settingsCookie=defaultCookie;this.saveSettings();}else{this.loadSettings();for(var setting in defaultCookie){if(settingsCookie[setting]==undefined){settingsCookie[setting]=defaultCookie[setting];this.saveSettings();}}}};Core.prototype.saveSettings=function(){$.cookie("better-discord",JSON.stringify(settingsCookie),{expires:365,path:'/'});};Core.prototype.loadSettings=function(){settingsCookie=JSON.parse($.cookie("better-discord"));};var botlist=["119598467310944259"];Core.prototype.initObserver=function(){mainObserver=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if(mutation.target.getAttribute('class')!=null){if(mutation.target.classList.contains('title-wrap')||mutation.target.classList.contains('chat')){quickEmoteMenu.obsCallback();voiceMode.obsCallback();if(typeof pluginModule!=="undefined")pluginModule.channelSwitch();}
if(mutation.target.getAttribute('class').indexOf('scroller messages')!=-1){if(typeof pluginModule!=="undefined")pluginModule.newMessage();}}
emoteModule.obsCallback(mutation);});});mainObserver.observe(document,{childList:true,subtree:true});};Core.prototype.constructChangelog=function(){var changeLog=''+'<div id="bd-wn-modal" class="modal" style="opacity:1;">'+' <div class="modal-inner">'+' <div id="bdcl" class="change-log"> '+' <div class="header">'+' <strong>What\'s new in BetterDiscord JS v1.53&'+jsVersion+'</strong>'+' <button class="close" onclick=\'$("#bd-wn-modal").remove();\'></button>'+' </div><!--header-->'+' <div class="scroller-wrap">'+' <div class="scroller">';if(bdchangelog.changes!=null){changeLog+=''+'<h1 class="changelog-added">'+' <span>New Stuff</span>'+'</h1>'+'<ul>';for(var change in bdchangelog.changes){change=bdchangelog.changes[change];changeLog+=''+'<li>'+' <strong>'+change.title+'</strong>'+' <div>'+change.text+'</div>'+'</li>';}
emoteModule.obsCallback(mutation);});});mainObserver.observe(document,{childList:true,subtree:true});};Core.prototype.constructChangelog=function(){var changeLog=''+'<div id="bd-wn-modal" class="modal" style="opacity:1;">'+' <div class="modal-inner">'+' <div id="bdcl" class="change-log"> '+' <div class="header">'+' <strong>What\'s new in BetterDiscord JS'+jsVersion+'</strong>'+' <button class="close" onclick=\'$("#bd-wn-modal").remove();\'></button>'+' </div><!--header-->'+' <div class="scroller-wrap">'+' <div class="scroller">';if(bdchangelog.changes!=null){changeLog+=''+'<h1 class="changelog-added">'+' <span>New Stuff</span>'+'</h1>'+'<ul>';for(var change in bdchangelog.changes){change=bdchangelog.changes[change];changeLog+=''+'<li>'+' <strong>'+change.title+'</strong>'+' <div>'+change.text+'</div>'+'</li>';}
changeLog+='</ul>';}
if(bdchangelog.fixes!=null){changeLog+=''+'<h1 class="changelog-fixed">'+' <span>Fixed</span>'+'</h1>'+'<ul>';for(var fix in bdchangelog.fixes){fix=bdchangelog.fixes[fix];changeLog+=''+'<li>'+' <strong>'+fix.title+'</strong>'+' <div>'+fix.text+'</div>'+'</li>';}
changeLog+='</ul>';}