This commit is contained in:
Mirco Wittrien 2020-03-31 19:23:05 +02:00
parent adedd97ede
commit f73977e106
6 changed files with 35 additions and 56 deletions

View File

@ -4296,7 +4296,7 @@
DiscordClassModules.Badge = BDFDB.ModuleUtils.findByProperties("numberBadge", "textBadge", "iconBadge");
DiscordClassModules.BotTag = BDFDB.ModuleUtils.findByProperties("botTag", "botTagInvert");
DiscordClassModules.Button = BDFDB.ModuleUtils.findByProperties("colorBlack", "button");
DiscordClassModules.Call = BDFDB.ModuleUtils.findByProperties("callAvatarWrapper", "video");
DiscordClassModules.CallAvatar = BDFDB.ModuleUtils.findByProperties("callAvatarMask", "video");
DiscordClassModules.CallCurrent = BDFDB.ModuleUtils.findByProperties("wrapper", "fullScreen");
DiscordClassModules.CallDetails = BDFDB.ModuleUtils.findByProperties("container", "hotspot");
DiscordClassModules.CallIncoming = BDFDB.ModuleUtils.findByProperties("incomingCall", "container");
@ -4695,9 +4695,10 @@
buttonspinner: ["Button", "spinner"],
buttonspinneritem: ["Button", "spinnerItem"],
buttonsubmitting: ["Button", "submitting"],
callavatarvideo: ["Call", "callAvatarVideo"],
callavatarvoice: ["Call", "callAvatarVoice"],
callavatarwrapper: ["Call", "callAvatarWrapper"],
callavatarmask: ["CallAvatar", "callAvatarMask"],
callavatarvideo: ["CallAvatar", "videoAvatar"],
callavatarvoice: ["CallAvatar", "voiceAvatar"],
callavatarwrapper: ["CallAvatar", "wrapper"],
callcurrentcontainer: ["CallCurrent", "wrapper"],
callcurrentdetails: ["CallDetails", "container"],
callcurrentvideo: ["Video", "video"],
@ -4705,8 +4706,8 @@
callincomingcontainer: ["CallIncoming", "container"],
callincominginner: ["CallIncomingInner", "incomingCallInner"],
callmembers: ["CallIncomingInner", "members"],
callselected: ["Call", "selected"],
callvideo: ["Call", "video"],
callselected: ["CallAvatar", "selected"],
callvideo: ["CallAvatar", "video"],
card: ["Card", "card"],
cardbrand: ["Card", "cardBrand"],
cardbrandoutline: ["Card", "cardBrandOutline"],

File diff suppressed because one or more lines are too long

View File

@ -76,17 +76,6 @@ var PersonalPins = (_ => {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
if (this.started) return;
BDFDB.PluginUtils.init(this);
// REMOVE 30.01.2020
let notesold = BDFDB.DataUtils.load(this, "notes"), notes = {};
for (let guild_id in notesold) {
notes[guild_id] = {};
for (let channel_id in notesold[guild_id]) {
notes[guild_id][channel_id] = {};
for (let message_idPOS in notesold[guild_id][channel_id]) notes[guild_id][channel_id][message_idPOS.split("_")[0]] = notesold[guild_id][channel_id][message_idPOS];
}
}
BDFDB.DataUtils.save(notes, this, "notes");
BDFDB.ModuleUtils.forceAllUpdates(this);
}

View File

@ -1,5 +1,10 @@
//META{"name":"PluginRepo","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/PluginRepo","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/PluginRepo/PluginRepo.plugin.js"}*//
var PluginRepo = (_ => {
var loading, cachedPlugins, grabbedPlugins, foundPlugins, loadedPlugins, updateInterval;
const pluginStates = {//META{"name":"PluginRepo","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/PluginRepo","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/PluginRepo/PluginRepo.plugin.js"}*//
var PluginRepo = (_ => {
var loading, cachedPlugins, grabbedPlugins, foundPlugins, loadedPlugins, updateInterval;
@ -238,13 +243,6 @@ var PluginRepo = (_ => {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
if (this.started) return;
BDFDB.PluginUtils.init(this);
// REMOVE 10.02.2020
let olddata = BDFDB.DataUtils.load(this, "ownlist", "ownlist");
if (olddata) {
BDFDB.DataUtils.save(olddata, this, "custom");
BDFDB.DataUtils.remove(this, "ownlist");
}
this.loadPlugins();
@ -556,7 +554,7 @@ var PluginRepo = (_ => {
BDFDB.DOMUtils.remove("iframe.discordSandbox", ".pluginrepo-loadingicon");
let settings = BDFDB.DataUtils.load(this, "settings");
let getPluginInfo, extractConfigInfo, createFrame, runInFrame;
let frame, framerunning = false, framequeue = [], outdated = 0, newentries = 0, i = 0;
let frame, frameRunning = false, frameQueue = [], outdated = 0, newentries = 0, i = 0;
let tags = ["getName", "getVersion", "getAuthor", "getDescription"];
let seps = ["\"", "\'", "\`"];
let newentriesdata = BDFDB.DataUtils.load(this, "newentriesdata"), customList = this.getCustomList();
@ -569,6 +567,7 @@ var PluginRepo = (_ => {
loadedPlugins = {};
grabbedPlugins = result.split("\n").filter(n => n);
foundPlugins = grabbedPlugins.concat(customList);
foundPlugins = ["https://raw.githubusercontent.com/l0c4lh057/BetterDiscordStuff/master/Plugins/TypingIndicator/TypingIndicator.plugin.js"];
loading = {is:true, timeout:BDFDB.TimeUtils.timeout(_ => {
BDFDB.TimeUtils.clear(loading.timeout);
@ -599,7 +598,7 @@ var PluginRepo = (_ => {
return;
}
let finishCounter = 0, finishInterval = BDFDB.TimeUtils.interval(_ => {
if ((framequeue.length == 0 && !framerunning) || finishCounter > 300 || !loading.is) {
if ((frameQueue.length == 0 && !frameRunning) || finishCounter > 300 || !loading.is) {
BDFDB.TimeUtils.clear(loading.timeout);
BDFDB.TimeUtils.clear(finishInterval);
BDFDB.DOMUtils.remove(frame, loadingicon, ".pluginrepo-loadingicon");
@ -682,16 +681,16 @@ var PluginRepo = (_ => {
/* code is minified -> add newlines */
bodyCopy = body.replace(/}/g, "}\n");
}
let bodyWithoutSpecial = bodyCopy.replace(/\n|\r|\t/g, "");
let configreg = /(\.exports|config)\s*=\s*\{["'`]*info["'`]*\s*:\s*/i.exec(bodyWithoutSpecial);
if (url != "https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/PluginRepo/PluginRepo.plugin.js" && configreg) {
let bodyWithoutSpecial = bodyCopy.replace(/\n|\r|\t/g, "").replace(/\n|\r|\t/g, "");
let configReg = /(\.exports|config)\s*=\s*\{\s*["'`]*info["'`]*\s*:\s*/i.exec(bodyWithoutSpecial);
if (url != "https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/PluginRepo/PluginRepo.plugin.js" && configReg) {
try {
extractConfigInfo(plugin, JSON.parse('{"info":' + bodyWithoutSpecial.substring(configreg.index).split(configreg[0])[1].split("};")[0].split("}},")[0] + '}'));
extractConfigInfo(plugin, JSON.parse('{"info":' + bodyWithoutSpecial.substring(configReg.index).split(configReg[0])[1].split("};")[0].split("}},")[0] + '}'));
}
catch (err) {
try {
let i = 0, j = 0, configString = "";
for (let c of (bodyWithoutSpecial.substring(configreg.index).split(configreg[0])[1].split("};")[0].split("}},")[0]).replace(/,/g, ',"').replace(/:/g, '":').replace(/{/g, '{"').replace(/""/g, '"').replace(/" /g, ' ').replace(/,"{/g, ',{').replace(/,"\[/g, ',[').replace(/":\/\//g, ':\/\/')) {
for (let c of (bodyWithoutSpecial.substring(configReg.index).split(configReg[0])[1].split("};")[0].split("}},")[0]).replace(/,/g, ',"').replace(/:/g, '":').replace(/{/g, '{"').replace(/""/g, '"').replace(/" /g, ' ').replace(/,"{/g, ',{').replace(/,"\[/g, ',[').replace(/":\/\//g, ':\/\/')) {
configString += c;
if (c == "{") i++;
else if (c == "}") j++;
@ -699,9 +698,7 @@ var PluginRepo = (_ => {
}
extractConfigInfo(plugin, JSON.parse('{"info":' + configString + '}'));
}
catch (err2) {
console.log(err2);
}
catch (err2) {}
}
}
else {
@ -727,7 +724,7 @@ var PluginRepo = (_ => {
if (!cachedPlugins.includes(url)) newentries++;
}
else if (frame && frame.contentWindow) {
framequeue.push({body, url});
frameQueue.push({body, url});
runInFrame();
}
}
@ -786,14 +783,14 @@ var PluginRepo = (_ => {
}
runInFrame = _ => {
if (framerunning) return;
let framedata = framequeue.shift();
if (!framedata) return;
framerunning = true;
let {body, url} = framedata;
let name = body.replace(/\s*:\s*/g, ":").split('"name":"');
if (name.length > 1) {
name = name[1].split('"')[0];
if (frameRunning) return;
let frameData = frameQueue.shift();
if (!frameData) return;
let {body, url} = frameData;
let name = (body.replace(/\s*:\s*/g, ":").split('"name":"')[1] || "").split('"')[0];
name = name ? name : (body.replace(/ {2,}/g, " ").replace(/\r/g, "").split("@name ")[1] || "").split("\n")[0];
if (name) {
frameRunning = true;
let processResult = plugin => {
if (BDFDB.ObjectUtils.is(plugin)) {
plugin.url = url;
@ -801,7 +798,7 @@ var PluginRepo = (_ => {
if (this.isPluginOutdated(plugin, url)) outdated++;
if (!cachedPlugins.includes(url)) newentries++;
}
framerunning = false;
frameRunning = false;
runInFrame();
};
let evalResultReceived = e => {
@ -817,9 +814,9 @@ var PluginRepo = (_ => {
window.addEventListener("message", evalResultReceived);
if (frame.contentWindow) frame.contentWindow.postMessage({origin:"PluginRepo",reason:"Eval",jsstring:`
try {
${body}
var p = new ${name}();
var data = {
${body};
let p = new ${name}();
let data = {
"getName":getString(p.getName()),
"getAuthor":getString(p.getAuthor()),
"getVersion":getString(p.getVersion()),

View File

@ -157,7 +157,6 @@ https://raw.githubusercontent.com/planetarian/BetterDiscordPlugins/master/Zalgo.
https://raw.githubusercontent.com/qwerasd205/qwerasd205.github.io/master/EditUploads.plugin.js
https://raw.githubusercontent.com/qwerasd205/qwerasd205.github.io/master/EmptyEnter.plugin.js
https://raw.githubusercontent.com/qwerasd205/qwerasd205.github.io/master/ExtendedContextMenu.plugin.js
https://raw.githubusercontent.com/qwerasd205/qwerasd205.github.io/master/RepoUtils.plugin.js
https://raw.githubusercontent.com/qwerasd205/qwerasd205.github.io/master/WordNotifications.plugin.js
https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js
https://raw.githubusercontent.com/rauenzi/BetterDiscordAddons/master/Plugins/AccountDetailsPlus/AccountDetailsPlus.plugin.js

View File

@ -309,13 +309,6 @@ var ThemeRepo = (_ => {
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
if (this.started) return;
BDFDB.PluginUtils.init(this);
// REMOVE 10.02.2020
let olddata = BDFDB.DataUtils.load(this, "ownlist", "ownlist");
if (olddata) {
BDFDB.DataUtils.save(olddata, this, "custom");
BDFDB.DataUtils.remove(this, "ownlist");
}
this.loadThemes();