But notice

This commit is contained in:
Jiiks 2016-05-20 08:12:49 +03:00
parent b742f86ee0
commit 457f314ac3
1 changed files with 1 additions and 1 deletions

2
js/main.min.js vendored
View File

@ -2,7 +2,7 @@ var settingsPanel,emoteModule,utils,quickEmoteMenu,opublicServers,voiceMode,plug
Core.prototype.init=function(){var self=this;var lVersion=(typeof(version)==="undefined")?bdVersion:version;if(lVersion<supportedVersion){this.alert("Not Supported","BetterDiscord v"+lVersion+"(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");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();customCssEditor=new CustomCssEditor();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();});window.addEventListener("beforeunload",function(){if(settingsCookie["bda-dc-0"]){$('.btn.btn-disconnect').click();}});$(document).on("mousedown",function(e){});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);}}
self.alert("Notice","There is currently a bug causing edits from other people not appear properly.<br>This only affects messges with emotes(disable emotes to see edits properly)<br>This notice will not appear on start once it's fixed.<br>No eta for a fix");$("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).find(".emoji-picker").length){var fc=mutation.target.firstChild;if(fc.classList.contains("popout")){quickEmoteMenu.obsCallback($(fc));}}
if(typeof pluginModule!=="undefined")pluginModule.rawObserver(mutation);if(mutation.target.getAttribute('class')!=null){if(mutation.target.classList.contains('title-wrap')||mutation.target.classList.contains('chat')){voiceMode.obsCallback();if(typeof pluginModule!=="undefined")pluginModule.channelSwitch();}
if(mutation.target.getAttribute('class').indexOf('scroller messages')!=-1){if(typeof pluginModule!=="undefined")pluginModule.newMessage();}