2020-08-26 12:10:17 +02:00
|
|
|
(a=>{if(window['BDFDB']&&window['BDFDB']['PluginUtils']&&typeof window['BDFDB']['PluginUtils']['cleanUp']=='function')window['BDFDB']['PluginUtils']['cleanUp'](window['BDFDB']);const b={'myPlugins':Object['assign']({},window['BDFDB']&&window['BDFDB']['myPlugins']),'InternalData':Object['assign']({'pressedKeys':[],'mousePosition':{'pageX':0x0,'pageY':0x0},'componentPatchQueries':{}},window['BDFDB']&&window['BDFDB']['InternalData'],{'creationTime':performance['now']()}),'name':'BDFDB'};const c={'name':'BDFDB','started':!![],'patchPriority':0x0};const d=Math['round'](Math['random']()*0x2386f26fc10000),e='278543574059057154',f='410787888507256842';b['InternalData']['loadId']=d;var g={};if(typeof Array['prototype']['flat']!='function')Array['prototype']['flat']=function(){return this;};c['defaults']={'settings':{'showToasts':{'value':!![],'description':'Show\x20Plugin\x20start\x20and\x20stop\x20Toasts'},'showSupportBadges':{'value':!![],'description':'Show\x20little\x20Badges\x20for\x20Users\x20who\x20support\x20my\x20Patreon'}}};b['LogUtils']={};b['LogUtils']['log']=function(J,K){console['log']('%c['+(typeof K=='string'&&K||'BDFDB')+']','color:\x20#3a71c1;\x20font-weight:\x20700;',(typeof J=='string'&&J||'')['trim']());};b['LogUtils']['warn']=function(J,K){console['warn']('%c['+(typeof K=='string'&&K||'BDFDB')+']','color:\x20#3a71c1;\x20font-weight:\x20700;',(typeof J=='string'&&J||'')['trim']());};b['LogUtils']['error']=function(J,K){console['error']('%c['+(typeof K=='string'&&K||'BDFDB')+']','color:\x20#3a71c1;\x20font-weight:\x20700;','Fatal\x20Error:\x20'+(typeof J=='string'&&J||'')['trim']());};b['LogUtils']['log']('Loading\x20library.');b['PluginUtils']={};b['PluginUtils']['load']=function(J){J['name']=J['name']||(typeof J['getName']=='function'?J['getName']():null);J['version']=J['version']||(typeof J['getVersion']=='function'?J['getVersion']():null);J['author']=J['author']||(typeof J['getAuthor']=='function'?J['getAuthor']():null);J['description']=J['description']||(typeof J['getDescription']=='function'?J['getDescription']():null);if(typeof J['getSettingsPanel']!='function')J['getSettingsPanel']=K=>{return J['started']&&b['PluginUtils']['createSettingsPanel'](J,[]);};if(!J['updateChecked']){J['updateChecked']=!![];let K=['ImageZoom','ImageGallery','ReverseImageSearch','ShowImageDetails']['includes'](J['name'])?'https://mwittrien.github.io/BetterDiscordAddons/Plugins/ImageUtilities/ImageUtilities.plugin.js':['BetterFriendCount']['includes'](J['name'])?'https://mwittrien.github.io/BetterDiscordAddons/Plugins/BetterFriendList/BetterFriendList.plugin.js':typeof J['getRawUrl']=='function'&&typeof J['getRawUrl']()=='string'?J['getRawUrl']():'https://mwittrien.github.io/BetterDiscordAddons/Plugins/'+J['name']+'/'+J['name']+'.plugin.js';b['PluginUtils']['checkUpdate'](J['name'],K);if(!window['PluginUpdates']||typeof window['PluginUpdates']!=='object')window['PluginUpdates']={'plugins':{}};window['PluginUpdates']['plugins'][K]={'name':J['name'],'raw':K,'version':J['version']};if(typeof window['PluginUpdates']['interval']==='undefined')window['PluginUpdates']['interval']=b['TimeUtils']['interval'](L=>{b['PluginUtils']['checkAllUpdates']();},0x3e8*0x3c*0x3c*0x2);b['TimeUtils']['timeout'](L=>{delete J['updateChecked'];},0x7530);}};b['PluginUtils']['init']=b['loadMessage']=function(J){b['PluginUtils']['load'](J);let K=b['LanguageUtils']['LibraryStringsFormat']('toast_plugin_started','v'+J['version']);b['LogUtils']['log'](K,J['name']);if(g['showToasts']&&!b['BDUtils']['getSettings'](b['BDUtils']['settingsIds']['showToasts']))b['NotificationUtils']['toast'](J['name']+'\x20'+K,{'nopointer':!![]});if(typeof J['initConstructor']==='function')b['TimeUtils']['suppress'](J['initConstructor']['bind'](J),'Could\x20not\x20initiate\x20constructor!',J['name'])();if(typeof J['css']==='string')b['DOMUtils']['appendLocalStyle'](J['name'],J['css']);c['patchPlugin'](J);c['addSpecialListeners'](J);b['PluginUtils']['translate'](J);b['PluginUtils']['checkChangeLog'](J);J['started']=!![];delete J['stopping'];let L=0x1;for(let M in b['myPlugins'])if(
|